Skip to content
Snippets Groups Projects
Commit 152f95bc authored by rswindell's avatar rswindell
Browse files

New ARS keywords: DELETED, INACTIVE, and ACTIVE.

parent 6d883b83
Branches
Tags
No related merge requests found
......@@ -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 2005 Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 2006 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 *
......@@ -357,6 +357,27 @@ uchar* arstr(ushort* count, char* str, scfg_t* cfg)
else if(!strnicmp(str+i,"EXPIRE",6)) {
artype=AR_EXPIRE;
i+=5; }
else if(!strnicmp(str+i,"ACTIVE",6)) {
artype=AR_ACTIVE;
if(not)
ar[j++]=AR_NOT;
not=0;
ar[j++]=artype;
i+=5; }
else if(!strnicmp(str+i,"INACTIVE",8)) {
artype=AR_INACTIVE;
if(not)
ar[j++]=AR_NOT;
not=0;
ar[j++]=artype;
i+=7; }
else if(!strnicmp(str+i,"DELETED",7)) {
artype=AR_DELETED;
if(not)
ar[j++]=AR_NOT;
not=0;
ar[j++]=artype;
i+=6; }
else if(!strnicmp(str+i,"EXPERT",6)) {
artype=AR_EXPERT;
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 2005 Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 2006 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 *
......@@ -111,6 +111,9 @@ enum { /* Access requirement binaries */
,AR_PROT
,AR_GUEST
,AR_QNODE
,AR_ACTIVE
,AR_INACTIVE
,AR_DELETED
};
#endif /* Don't add anything after this line */
......@@ -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 2006 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 *
......@@ -179,6 +179,21 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
result=!_not;
#endif
break;
case AR_ACTIVE:
if(user->misc&(DELETED|INACTIVE))
result=_not;
else result=!_not;
break;
case AR_INACTIVE:
if(!(user->misc&INACTIVE))
result=_not;
else result=!_not;
break;
case AR_DELETED:
if(!(user->misc&DELETED))
result=_not;
else result=!_not;
break;
case AR_EXPERT:
if(!(user->misc&EXPERT))
result=_not;
......
......@@ -1425,6 +1425,21 @@ static BOOL ar_exp(scfg_t* cfg, uchar **ptrptr, user_t* user)
result=!not;
#endif
break;
case AR_ACTIVE:
if(user==NULL || user->misc&(DELETED|INACTIVE))
result=not;
else result=!not;
break;
case AR_INACTIVE:
if(user==NULL || !(user->misc&INACTIVE))
result=not;
else result=!not;
break;
case AR_DELETED:
if(user==NULL || !(user->misc&DELETED))
result=not;
else result=!not;
break;
case AR_EXPERT:
if(user==NULL || !(user->misc&EXPERT))
result=not;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment