Commit 1200efb4 authored by rswindell's avatar rswindell
Browse files

Created new bool ARS keywords (convenience shorthand):

* GUEST (shorthand for "REST G")
* QNODE (shorthand for "REST Q").
They're not really much shorter, but the intended function is more clear to the
sysop.
parent 47f04a91
......@@ -8,7 +8,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* Copyright 2004 Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 2005 Rob Swindell - http://www.synchro.net/copyright.html *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
......@@ -371,6 +371,20 @@ uchar* arstr(ushort* count, char* str, scfg_t* cfg)
not=0;
ar[j++]=artype;
i+=4; }
else if(!strnicmp(str+i,"GUEST",5)) {
artype=AR_GUEST;
if(not)
ar[j++]=AR_NOT;
not=0;
ar[j++]=artype;
i+=4; }
else if(!strnicmp(str+i,"QNODE",5)) {
artype=AR_QNODE;
if(not)
ar[j++]=AR_NOT;
not=0;
ar[j++]=artype;
i+=4; }
else if(!strnicmp(str+i,"QUIET",5)) {
artype=AR_QUIET;
if(not)
......
......@@ -8,7 +8,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* Copyright 2000 Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 2005 Rob Swindell - http://www.synchro.net/copyright.html *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
......@@ -109,6 +109,8 @@ enum { /* Access requirement binaries */
,AR_LINUX
,AR_SHELL
,AR_PROT
,AR_GUEST
,AR_QNODE
};
#endif /* Don't add anything after this line */
......@@ -88,6 +88,8 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
case AR_LOCAL:
case AR_EXPERT:
case AR_SYSOP:
case AR_GUEST:
case AR_QNODE:
case AR_QUIET:
case AR_OS2:
case AR_DOS:
......@@ -191,6 +193,16 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
result=_not;
else result=!_not;
break;
case AR_GUEST:
if(!(user->rest&FLAG('G')))
result=_not;
else result=!_not;
break;
case AR_QNODE:
if(!(user->rest&FLAG('Q')))
result=_not;
else result=!_not;
break;
case AR_QUIET:
if(thisnode.status!=NODE_QUIET)
result=_not;
......
......@@ -1300,6 +1300,8 @@ static BOOL ar_exp(scfg_t* cfg, uchar **ptrptr, user_t* user)
case AR_LOCAL:
case AR_EXPERT:
case AR_SYSOP:
case AR_GUEST:
case AR_QNODE:
case AR_QUIET:
case AR_OS2:
case AR_DOS:
......@@ -1395,6 +1397,16 @@ static BOOL ar_exp(scfg_t* cfg, uchar **ptrptr, user_t* user)
result=not;
else result=!not;
break;
case AR_GUEST:
if(user==NULL || !(user->rest&FLAG('G')))
result=not;
else result=!not;
break;
case AR_QNODE:
if(user==NULL || !(user->rest&FLAG('Q')))
result=not;
else result=!not;
break;
case AR_QUIET:
result=not;
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment