Commit 7b041b73 authored by rswindell's avatar rswindell
Browse files

Changed use of decimal constant, 90, to macro: SYSOP_LEVEL.

parent 81857918
......@@ -744,8 +744,9 @@ enum { /* Values of mode for userlist function */
/**********/
#define CRLF { outchar(CR); outchar(LF); }
#define SYSOP (useron.level>=90 || sys_status & SS_TMPSYSOP)
#define REALSYSOP (useron.level>=90)
#define SYSOP_LEVEL 90
#define SYSOP (useron.level>=SYSOP_LEVEL || sys_status & SS_TMPSYSOP)
#define REALSYSOP (useron.level>=SYSOP_LEVEL)
#define FLAG(x) (ulong)(1UL<<(x-'A'))
#define CLS outchar(FF)
#define WHERE __LINE__,__FILE__
......
......@@ -813,7 +813,7 @@ static BOOL ar_exp(scfg_t* cfg, uchar **ptrptr, user_t* user)
else result=!not;
break;
case AR_SYSOP:
if(user->level<90)
if(user->level<SYSOP_LEVEL)
result=not;
else result=!not;
break;
......
......@@ -1147,7 +1147,7 @@ void sbbs_t::moduserdat(uint xtrnnum)
putuserrec(&cfg,useron.number,U_FLAGS1,8,ultoa(useron.flags1,tmp,16));
lseek(file,373,SEEK_SET);
read(file,&i,2); /* SecLvl */
if(i<90) {
if(i<SYSOP_LEVEL) {
useron.level=i;
putuserrec(&cfg,useron.number,U_LEVEL,2,ultoa(useron.level,tmp,10)); }
close(file);
......@@ -1162,7 +1162,7 @@ void sbbs_t::moduserdat(uint xtrnnum)
break;
if(i==15 && isdigit(str[0])) {
mod=atoi(str);
if(mod<90) {
if(mod<SYSOP_LEVEL) {
useron.level=(char)mod;
putuserrec(&cfg,useron.number,U_LEVEL,2,ultoa(useron.level,tmp,10)); } }
......@@ -1219,7 +1219,7 @@ void sbbs_t::moduserdat(uint xtrnnum)
if(c==1) { /* file has been updated */
lseek(file,105,SEEK_CUR); /* read security level */
read(file,&i,2);
if(i<90) {
if(i<SYSOP_LEVEL) {
useron.level=i;
putuserrec(&cfg,useron.number,U_LEVEL,2,ultoa(useron.level,tmp,10)); }
lseek(file,75,SEEK_CUR); /* read in expiration date */
......@@ -1249,7 +1249,7 @@ void sbbs_t::moduserdat(uint xtrnnum)
subtract_cdt(&cfg,&useron,-mod); } /* subtract from free cdt first */
if(fgets(str,81,stream)) { /* main level */
mod=atoi(str);
if(isdigit(str[0]) && mod<90) {
if(isdigit(str[0]) && mod<SYSOP_LEVEL) {
useron.level=(uchar)mod;
putuserrec(&cfg,useron.number,U_LEVEL,2,ultoa(useron.level,tmp,10)); } }
fgets(str,81,stream); /* was transfer level, now ignored */
......
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