Commit b5be2819 authored by rswindell's avatar rswindell
Browse files

Removed ULB and DLB ARS keywords, replaced with ULK (uploaded kilobytes),

ULM (uploaded megabytes), and DLK and DLM (for downloaded K/Mbytes).
parent 61819384
......@@ -236,14 +236,20 @@ uchar* arstr(ushort* count, char* str, scfg_t* cfg)
else if(!strnicmp(str+i,"ULS",3)) {
artype=AR_ULS;
i+=2; }
else if(!strnicmp(str+i,"ULB",3)) {
artype=AR_ULB;
else if(!strnicmp(str+i,"ULK",3)) {
artype=AR_ULK;
i+=2; }
else if(!strnicmp(str+i,"ULM",3)) {
artype=AR_ULM;
i+=2; }
else if(!strnicmp(str+i,"DLS",3)) {
artype=AR_DLS;
i+=2; }
else if(!strnicmp(str+i,"DLB",3)) {
artype=AR_DLB;
else if(!strnicmp(str+i,"DLK",3)) {
artype=AR_DLK;
i+=2; }
else if(!strnicmp(str+i,"DLM",3)) {
artype=AR_DLM;
i+=2; }
else if(!strnicmp(str+i,"DAY",3)) {
artype=AR_DAY;
......@@ -515,9 +521,11 @@ uchar* arstr(ushort* count, char* str, scfg_t* cfg)
case AR_LASTON:
case AR_LOGONS:
case AR_ULS:
case AR_ULB:
case AR_ULK:
case AR_ULM:
case AR_DLS:
case AR_DLB:
case AR_DLK:
case AR_DLM:
*((short *)(ar+j))=n;
j+=2;
break;
......
......@@ -115,9 +115,11 @@ enum { /* Access requirement binaries */
,AR_INACTIVE
,AR_DELETED
,AR_ULS
,AR_ULB
,AR_ULK
,AR_ULM
,AR_DLS
,AR_DLB
,AR_DLK
,AR_DLM
};
#endif /* Don't add anything after this line */
......@@ -456,8 +456,15 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
result=!_not;
(*ptrptr)++;
break;
case AR_ULB:
if((equal && user->ulb!=i) || (!equal && user->ulb<i))
case AR_ULK:
if((equal && (user->ulb/1024)!=i) || (!equal && (user->ulb/1024)<i))
result=_not;
else
result=!_not;
(*ptrptr)++;
break;
case AR_ULM:
if((equal && (user->ulb/(1024*1024))!=i) || (!equal && (user->ulb/(1024*1024))<i))
result=_not;
else
result=!_not;
......@@ -470,8 +477,15 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
result=!_not;
(*ptrptr)++;
break;
case AR_DLB:
if((equal && user->dlb!=i) || (!equal && user->dlb<i))
case AR_DLK:
if((equal && user->dlb/1024!=i) || (!equal && user->dlb/1024<i))
result=_not;
else
result=!_not;
(*ptrptr)++;
break;
case AR_DLM:
if((equal && user->dlb/(1024*1024)!=i) || (!equal && user->dlb/(1024*1024)<i))
result=_not;
else
result=!_not;
......
......@@ -1679,8 +1679,15 @@ static BOOL ar_exp(scfg_t* cfg, uchar **ptrptr, user_t* user)
result=!not;
(*ptrptr)++;
break;
case AR_ULB:
if((equal && user->ulb!=i) || (!equal && user->ulb<i))
case AR_ULK:
if((equal && user->ulb/1024!=i) || (!equal && user->ulb/1024<i))
result=not;
else
result=!not;
(*ptrptr)++;
break;
case AR_ULM:
if((equal && user->ulb/(1024*1024)!=i) || (!equal && user->ulb/(1024*1024)<i))
result=not;
else
result=!not;
......@@ -1693,8 +1700,15 @@ static BOOL ar_exp(scfg_t* cfg, uchar **ptrptr, user_t* user)
result=!not;
(*ptrptr)++;
break;
case AR_DLB:
if((equal && user->dlb!=i) || (!equal && user->dlb<i))
case AR_DLK:
if((equal && user->dlb/1024!=i) || (!equal && user->dlb/1024<i))
result=not;
else
result=!not;
(*ptrptr)++;
break;
case AR_DLM:
if((equal && user->dlb/(1024*1024)!=i) || (!equal && user->dlb/(1024*1024)<i))
result=not;
else
result=!not;
......
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