Commit c48f2765 authored by rswindell's avatar rswindell
Browse files

Created "PROT" ARS keyword (no short-hand). Will probably only really work

correctly for the BBS (e.g. "Telnet" and "RLogin") until the chk_ar function is
changed to accept a client_t argument.
parent 4f9ba989
......@@ -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 2004 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 *
......@@ -285,6 +285,13 @@ uchar* arstr(ushort* count, char* str, scfg_t* cfg)
not=0;
ar[j++]=artype;
i+=2; }
else if(!strnicmp(str+i,"PROT",4)) {
artype=AR_PROT;
if(not)
ar[j++]=AR_NOT;
not=0;
ar[j++]=artype;
i+=2; }
else if(!strnicmp(str+i,"SUBCODE",7)) {
artype=AR_SUBCODE;
i+=6; }
......
......@@ -108,6 +108,7 @@ enum { /* Access requirement binaries */
,AR_UNIX
,AR_LINUX
,AR_SHELL
,AR_PROT
};
#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 2000 Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 2004 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 *
......@@ -504,6 +504,14 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
while(*(*ptrptr))
(*ptrptr)++;
break;
case AR_PROT:
if(stricmp(user->modem,(char*)*ptrptr)) /* should this be changed to client.prot? */
result=_not;
else
result=!_not;
while(*(*ptrptr))
(*ptrptr)++;
break;
}
}
return(result);
......
......@@ -1618,6 +1618,15 @@ static BOOL ar_exp(scfg_t* cfg, uchar **ptrptr, user_t* user)
while(*(*ptrptr))
(*ptrptr)++;
break;
case AR_PROT:
if(user==NULL
|| stricmp(user->modem,(char*)*ptrptr)) /* should this be changed to client.prot? */
result=not;
else
result=!not;
while(*(*ptrptr))
(*ptrptr)++;
break;
}
}
return(result);
......
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