diff --git a/src/sbbs3/ars.c b/src/sbbs3/ars.c index ac518cdaa77d1f2c427a34589feae1dbbc95c35a..bc54044b10d2677d9a97a001aeefb1637d4c7b6a 100644 --- a/src/sbbs3/ars.c +++ b/src/sbbs3/ars.c @@ -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) diff --git a/src/sbbs3/ars_defs.h b/src/sbbs3/ars_defs.h index 57250e99a51aa3d5351182d8679d2e458cbe7e1e..3301c341e01a438a2ee4e01daa62890264d50586 100644 --- a/src/sbbs3/ars_defs.h +++ b/src/sbbs3/ars_defs.h @@ -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 */ diff --git a/src/sbbs3/chk_ar.cpp b/src/sbbs3/chk_ar.cpp index 2467abd08f4f6d5ccb321e42df25ec07996907b7..b079e82225338a44ea63d9f6003fb3d94c8f8e3a 100644 --- a/src/sbbs3/chk_ar.cpp +++ b/src/sbbs3/chk_ar.cpp @@ -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; diff --git a/src/sbbs3/userdat.c b/src/sbbs3/userdat.c index bf14b8f3ddb471217d1691eaa8bdf5c21fe1a7c8..02afc8f595b2cd92ec92dcc1976e9b1d435fa3cb 100644 --- a/src/sbbs3/userdat.c +++ b/src/sbbs3/userdat.c @@ -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;