Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
2bcb306a
Commit
2bcb306a
authored
24 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Prepended underscores to "and" and "or" variables to solve conflict with newer GCC.
parent
04cf0b28
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/sbbs3/chk_ar.cpp
+95
-95
95 additions, 95 deletions
src/sbbs3/chk_ar.cpp
with
95 additions
and
95 deletions
src/sbbs3/chk_ar.cpp
+
95
−
95
View file @
2bcb306a
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
bool
sbbs_t
::
ar_exp
(
uchar
**
ptrptr
,
user_t
*
user
)
bool
sbbs_t
::
ar_exp
(
uchar
**
ptrptr
,
user_t
*
user
)
{
{
bool
result
,
not
,
or
,
equal
;
bool
result
,
_
not
,
_
or
,
equal
;
uint
i
,
n
,
artype
,
age
;
uint
i
,
n
,
artype
,
age
;
ulong
l
;
ulong
l
;
struct
tm
*
tm
;
struct
tm
*
tm
;
...
@@ -51,29 +51,29 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
...
@@ -51,29 +51,29 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
if
((
**
ptrptr
)
==
AR_ENDNEST
)
if
((
**
ptrptr
)
==
AR_ENDNEST
)
break
;
break
;
not
=
or
=
equal
=
false
;
_
not
=
_
or
=
equal
=
false
;
if
((
**
ptrptr
)
==
AR_OR
)
{
if
((
**
ptrptr
)
==
AR_OR
)
{
or
=
true
;
_
or
=
true
;
(
*
ptrptr
)
++
;
}
(
*
ptrptr
)
++
;
}
if
((
**
ptrptr
)
==
AR_NOT
)
{
if
((
**
ptrptr
)
==
AR_NOT
)
{
not
=
true
;
_
not
=
true
;
(
*
ptrptr
)
++
;
}
(
*
ptrptr
)
++
;
}
if
((
**
ptrptr
)
==
AR_EQUAL
)
{
if
((
**
ptrptr
)
==
AR_EQUAL
)
{
equal
=
true
;
equal
=
true
;
(
*
ptrptr
)
++
;
}
(
*
ptrptr
)
++
;
}
if
((
result
&&
or
)
||
(
!
result
&&
!
or
))
if
((
result
&&
_
or
)
||
(
!
result
&&
!
_
or
))
break
;
break
;
if
((
**
ptrptr
)
==
AR_BEGNEST
)
{
if
((
**
ptrptr
)
==
AR_BEGNEST
)
{
(
*
ptrptr
)
++
;
(
*
ptrptr
)
++
;
if
(
ar_exp
(
ptrptr
,
user
))
if
(
ar_exp
(
ptrptr
,
user
))
result
=!
not
;
result
=!
_
not
;
else
else
result
=
not
;
result
=
_
not
;
while
((
**
ptrptr
)
!=
AR_ENDNEST
&&
(
**
ptrptr
))
/* in case of early exit */
while
((
**
ptrptr
)
!=
AR_ENDNEST
&&
(
**
ptrptr
))
/* in case of early exit */
(
*
ptrptr
)
++
;
(
*
ptrptr
)
++
;
if
(
!
(
**
ptrptr
))
if
(
!
(
**
ptrptr
))
...
@@ -101,9 +101,9 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
...
@@ -101,9 +101,9 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
switch
(
artype
)
{
switch
(
artype
)
{
case
AR_LEVEL
:
case
AR_LEVEL
:
if
((
equal
&&
user
->
level
!=
n
)
||
(
!
equal
&&
user
->
level
<
n
))
if
((
equal
&&
user
->
level
!=
n
)
||
(
!
equal
&&
user
->
level
<
n
))
result
=
not
;
result
=
_
not
;
else
else
result
=!
not
;
result
=!
_
not
;
if
(
!
result
)
{
if
(
!
result
)
{
noaccess_str
=
text
[
NoAccessLevel
];
noaccess_str
=
text
[
NoAccessLevel
];
noaccess_val
=
n
;
}
noaccess_val
=
n
;
}
...
@@ -111,18 +111,18 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
...
@@ -111,18 +111,18 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
case
AR_AGE
:
case
AR_AGE
:
age
=
getage
(
&
cfg
,
user
->
birth
);
age
=
getage
(
&
cfg
,
user
->
birth
);
if
((
equal
&&
age
!=
n
)
||
(
!
equal
&&
age
<
n
))
if
((
equal
&&
age
!=
n
)
||
(
!
equal
&&
age
<
n
))
result
=
not
;
result
=
_
not
;
else
else
result
=!
not
;
result
=!
_
not
;
if
(
!
result
)
{
if
(
!
result
)
{
noaccess_str
=
text
[
NoAccessAge
];
noaccess_str
=
text
[
NoAccessAge
];
noaccess_val
=
n
;
}
noaccess_val
=
n
;
}
break
;
break
;
case
AR_BPS
:
case
AR_BPS
:
if
((
equal
&&
cur_rate
!=
i
)
||
(
!
equal
&&
cur_rate
<
i
))
if
((
equal
&&
cur_rate
!=
i
)
||
(
!
equal
&&
cur_rate
<
i
))
result
=
not
;
result
=
_
not
;
else
else
result
=!
not
;
result
=!
_
not
;
(
*
ptrptr
)
++
;
(
*
ptrptr
)
++
;
if
(
!
result
)
{
if
(
!
result
)
{
noaccess_str
=
text
[
NoAccessBPS
];
noaccess_str
=
text
[
NoAccessBPS
];
...
@@ -130,82 +130,82 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
...
@@ -130,82 +130,82 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
break
;
break
;
case
AR_ANSI
:
case
AR_ANSI
:
if
(
!
(
user
->
misc
&
ANSI
))
if
(
!
(
user
->
misc
&
ANSI
))
result
=
not
;
result
=
_
not
;
else
result
=!
not
;
else
result
=!
_
not
;
break
;
break
;
case
AR_RIP
:
case
AR_RIP
:
if
(
!
(
user
->
misc
&
RIP
))
if
(
!
(
user
->
misc
&
RIP
))
result
=
not
;
result
=
_
not
;
else
result
=!
not
;
else
result
=!
_
not
;
break
;
break
;
case
AR_WIP
:
case
AR_WIP
:
if
(
!
(
user
->
misc
&
WIP
))
if
(
!
(
user
->
misc
&
WIP
))
result
=
not
;
result
=
_
not
;
else
result
=!
not
;
else
result
=!
_
not
;
break
;
break
;
case
AR_OS2
:
case
AR_OS2
:
#ifndef __OS2__
#ifndef __OS2__
result
=
not
;
result
=
_
not
;
#else
#else
result
=!
not
;
result
=!
_
not
;
#endif
#endif
break
;
break
;
case
AR_DOS
:
case
AR_DOS
:
#ifdef __FLAT__
#ifdef __FLAT__
result
=
not
;
result
=
_
not
;
#else
#else
result
=!
not
;
result
=!
_
not
;
#endif
#endif
break
;
break
;
case
AR_WIN32
:
case
AR_WIN32
:
#ifndef _WIN32
#ifndef _WIN32
result
=
not
;
result
=
_
not
;
#else
#else
result
=!
not
;
result
=!
_
not
;
#endif
#endif
break
;
break
;
case
AR_UNIX
:
case
AR_UNIX
:
#ifndef __unix__
#ifndef __unix__
result
=
not
;
result
=
_
not
;
#else
#else
result
=!
not
;
result
=!
_
not
;
#endif
#endif
break
;
break
;
case
AR_LINUX
:
case
AR_LINUX
:
#ifndef __linux__
#ifndef __linux__
result
=
not
;
result
=
_
not
;
#else
#else
result
=!
not
;
result
=!
_
not
;
#endif
#endif
break
;
break
;
case
AR_EXPERT
:
case
AR_EXPERT
:
if
(
!
(
user
->
misc
&
EXPERT
))
if
(
!
(
user
->
misc
&
EXPERT
))
result
=
not
;
result
=
_
not
;
else
result
=!
not
;
else
result
=!
_
not
;
break
;
break
;
case
AR_SYSOP
:
case
AR_SYSOP
:
if
(
!
SYSOP
)
if
(
!
SYSOP
)
result
=
not
;
result
=
_
not
;
else
result
=!
not
;
else
result
=!
_
not
;
break
;
break
;
case
AR_QUIET
:
case
AR_QUIET
:
if
(
thisnode
.
status
!=
NODE_QUIET
)
if
(
thisnode
.
status
!=
NODE_QUIET
)
result
=
not
;
result
=
_
not
;
else
result
=!
not
;
else
result
=!
_
not
;
break
;
break
;
case
AR_LOCAL
:
case
AR_LOCAL
:
if
(
online
!=
ON_LOCAL
)
if
(
online
!=
ON_LOCAL
)
result
=
not
;
result
=
_
not
;
else
result
=!
not
;
else
result
=!
_
not
;
break
;
break
;
case
AR_DAY
:
case
AR_DAY
:
now
=
time
(
NULL
);
now
=
time
(
NULL
);
tm
=
localtime
(
&
now
);
tm
=
localtime
(
&
now
);
if
(
tm
==
NULL
||
(
equal
&&
tm
->
tm_wday
!=
(
int
)
n
)
if
(
tm
==
NULL
||
(
equal
&&
tm
->
tm_wday
!=
(
int
)
n
)
||
(
!
equal
&&
tm
->
tm_wday
<
(
int
)
n
))
||
(
!
equal
&&
tm
->
tm_wday
<
(
int
)
n
))
result
=
not
;
result
=
_
not
;
else
else
result
=!
not
;
result
=!
_
not
;
if
(
!
result
)
{
if
(
!
result
)
{
noaccess_str
=
text
[
NoAccessDay
];
noaccess_str
=
text
[
NoAccessDay
];
noaccess_val
=
n
;
}
noaccess_val
=
n
;
}
...
@@ -214,9 +214,9 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
...
@@ -214,9 +214,9 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
l
=
(
ulong
)
i
*
1024UL
;
l
=
(
ulong
)
i
*
1024UL
;
if
((
equal
&&
user
->
cdt
+
user
->
freecdt
!=
l
)
if
((
equal
&&
user
->
cdt
+
user
->
freecdt
!=
l
)
||
(
!
equal
&&
user
->
cdt
+
user
->
freecdt
<
l
))
||
(
!
equal
&&
user
->
cdt
+
user
->
freecdt
<
l
))
result
=
not
;
result
=
_
not
;
else
else
result
=!
not
;
result
=!
_
not
;
(
*
ptrptr
)
++
;
(
*
ptrptr
)
++
;
if
(
!
result
)
{
if
(
!
result
)
{
noaccess_str
=
text
[
NoAccessCredit
];
noaccess_str
=
text
[
NoAccessCredit
];
...
@@ -224,18 +224,18 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
...
@@ -224,18 +224,18 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
break
;
break
;
case
AR_NODE
:
case
AR_NODE
:
if
((
equal
&&
cfg
.
node_num
!=
n
)
||
(
!
equal
&&
cfg
.
node_num
<
n
))
if
((
equal
&&
cfg
.
node_num
!=
n
)
||
(
!
equal
&&
cfg
.
node_num
<
n
))
result
=
not
;
result
=
_
not
;
else
else
result
=!
not
;
result
=!
_
not
;
if
(
!
result
)
{
if
(
!
result
)
{
noaccess_str
=
text
[
NoAccessNode
];
noaccess_str
=
text
[
NoAccessNode
];
noaccess_val
=
n
;
}
noaccess_val
=
n
;
}
break
;
break
;
case
AR_USER
:
case
AR_USER
:
if
((
equal
&&
user
->
number
!=
i
)
||
(
!
equal
&&
user
->
number
<
i
))
if
((
equal
&&
user
->
number
!=
i
)
||
(
!
equal
&&
user
->
number
<
i
))
result
=
not
;
result
=
_
not
;
else
else
result
=!
not
;
result
=!
_
not
;
(
*
ptrptr
)
++
;
(
*
ptrptr
)
++
;
if
(
!
result
)
{
if
(
!
result
)
{
noaccess_str
=
text
[
NoAccessUser
];
noaccess_str
=
text
[
NoAccessUser
];
...
@@ -247,9 +247,9 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
...
@@ -247,9 +247,9 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
||
cfg
.
sub
[
cursubnum
]
->
grp
!=
i
))
||
cfg
.
sub
[
cursubnum
]
->
grp
!=
i
))
||
(
!
equal
&&
cursubnum
<
cfg
.
total_subs
||
(
!
equal
&&
cursubnum
<
cfg
.
total_subs
&&
cfg
.
sub
[
cursubnum
]
->
grp
<
i
))
&&
cfg
.
sub
[
cursubnum
]
->
grp
<
i
))
result
=
not
;
result
=
_
not
;
else
else
result
=!
not
;
result
=!
_
not
;
(
*
ptrptr
)
++
;
(
*
ptrptr
)
++
;
if
(
!
result
)
{
if
(
!
result
)
{
noaccess_str
=
text
[
NoAccessGroup
];
noaccess_str
=
text
[
NoAccessGroup
];
...
@@ -257,9 +257,9 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
...
@@ -257,9 +257,9 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
break
;
break
;
case
AR_SUB
:
case
AR_SUB
:
if
((
equal
&&
cursubnum
!=
i
)
||
(
!
equal
&&
cursubnum
<
i
))
if
((
equal
&&
cursubnum
!=
i
)
||
(
!
equal
&&
cursubnum
<
i
))
result
=
not
;
result
=
_
not
;
else
else
result
=!
not
;
result
=!
_
not
;
(
*
ptrptr
)
++
;
(
*
ptrptr
)
++
;
if
(
!
result
)
{
if
(
!
result
)
{
noaccess_str
=
text
[
NoAccessSub
];
noaccess_str
=
text
[
NoAccessSub
];
...
@@ -268,9 +268,9 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
...
@@ -268,9 +268,9 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
case
AR_SUBCODE
:
case
AR_SUBCODE
:
if
(
cursubnum
>=
cfg
.
total_subs
if
(
cursubnum
>=
cfg
.
total_subs
||
strcmp
(
cfg
.
sub
[
cursubnum
]
->
code
,(
char
*
)
*
ptrptr
))
||
strcmp
(
cfg
.
sub
[
cursubnum
]
->
code
,(
char
*
)
*
ptrptr
))
result
=
not
;
result
=
_
not
;
else
else
result
=!
not
;
result
=!
_
not
;
while
(
*
(
*
ptrptr
))
while
(
*
(
*
ptrptr
))
(
*
ptrptr
)
++
;
(
*
ptrptr
)
++
;
if
(
!
result
)
if
(
!
result
)
...
@@ -282,9 +282,9 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
...
@@ -282,9 +282,9 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
||
cfg
.
dir
[
curdirnum
]
->
lib
!=
i
))
||
cfg
.
dir
[
curdirnum
]
->
lib
!=
i
))
||
(
!
equal
&&
curdirnum
<
cfg
.
total_dirs
||
(
!
equal
&&
curdirnum
<
cfg
.
total_dirs
&&
cfg
.
dir
[
curdirnum
]
->
lib
<
i
))
&&
cfg
.
dir
[
curdirnum
]
->
lib
<
i
))
result
=
not
;
result
=
_
not
;
else
else
result
=!
not
;
result
=!
_
not
;
(
*
ptrptr
)
++
;
(
*
ptrptr
)
++
;
if
(
!
result
)
{
if
(
!
result
)
{
noaccess_str
=
text
[
NoAccessLib
];
noaccess_str
=
text
[
NoAccessLib
];
...
@@ -292,9 +292,9 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
...
@@ -292,9 +292,9 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
break
;
break
;
case
AR_DIR
:
case
AR_DIR
:
if
((
equal
&&
curdirnum
!=
i
)
||
(
!
equal
&&
curdirnum
<
i
))
if
((
equal
&&
curdirnum
!=
i
)
||
(
!
equal
&&
curdirnum
<
i
))
result
=
not
;
result
=
_
not
;
else
else
result
=!
not
;
result
=!
_
not
;
(
*
ptrptr
)
++
;
(
*
ptrptr
)
++
;
if
(
!
result
)
{
if
(
!
result
)
{
noaccess_str
=
text
[
NoAccessDir
];
noaccess_str
=
text
[
NoAccessDir
];
...
@@ -303,9 +303,9 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
...
@@ -303,9 +303,9 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
case
AR_DIRCODE
:
case
AR_DIRCODE
:
if
(
curdirnum
>=
cfg
.
total_dirs
if
(
curdirnum
>=
cfg
.
total_dirs
||
strcmp
(
cfg
.
dir
[
curdirnum
]
->
code
,(
char
*
)
*
ptrptr
))
||
strcmp
(
cfg
.
dir
[
curdirnum
]
->
code
,(
char
*
)
*
ptrptr
))
result
=
not
;
result
=
_
not
;
else
else
result
=!
not
;
result
=!
_
not
;
while
(
*
(
*
ptrptr
))
while
(
*
(
*
ptrptr
))
(
*
ptrptr
)
++
;
(
*
ptrptr
)
++
;
if
(
!
result
)
if
(
!
result
)
...
@@ -314,9 +314,9 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
...
@@ -314,9 +314,9 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
case
AR_EXPIRE
:
case
AR_EXPIRE
:
now
=
time
(
NULL
);
now
=
time
(
NULL
);
if
(
!
user
->
expire
||
now
+
((
long
)
i
*
24L
*
60L
*
60L
)
>
user
->
expire
)
if
(
!
user
->
expire
||
now
+
((
long
)
i
*
24L
*
60L
*
60L
)
>
user
->
expire
)
result
=
not
;
result
=
_
not
;
else
else
result
=!
not
;
result
=!
_
not
;
(
*
ptrptr
)
++
;
(
*
ptrptr
)
++
;
if
(
!
result
)
{
if
(
!
result
)
{
noaccess_str
=
text
[
NoAccessExpire
];
noaccess_str
=
text
[
NoAccessExpire
];
...
@@ -325,54 +325,54 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
...
@@ -325,54 +325,54 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
case
AR_RANDOM
:
case
AR_RANDOM
:
n
=
sbbs_random
(
i
+
1
);
n
=
sbbs_random
(
i
+
1
);
if
((
equal
&&
n
!=
i
)
||
(
!
equal
&&
n
<
i
))
if
((
equal
&&
n
!=
i
)
||
(
!
equal
&&
n
<
i
))
result
=
not
;
result
=
_
not
;
else
else
result
=!
not
;
result
=!
_
not
;
(
*
ptrptr
)
++
;
(
*
ptrptr
)
++
;
break
;
break
;
case
AR_LASTON
:
case
AR_LASTON
:
now
=
time
(
NULL
);
now
=
time
(
NULL
);
if
((
now
-
user
->
laston
)
/
(
24L
*
60L
*
60L
)
<
(
long
)
i
)
if
((
now
-
user
->
laston
)
/
(
24L
*
60L
*
60L
)
<
(
long
)
i
)
result
=
not
;
result
=
_
not
;
else
else
result
=!
not
;
result
=!
_
not
;
(
*
ptrptr
)
++
;
(
*
ptrptr
)
++
;
break
;
break
;
case
AR_LOGONS
:
case
AR_LOGONS
:
if
((
equal
&&
user
->
logons
!=
i
)
||
(
!
equal
&&
user
->
logons
<
i
))
if
((
equal
&&
user
->
logons
!=
i
)
||
(
!
equal
&&
user
->
logons
<
i
))
result
=
not
;
result
=
_
not
;
else
else
result
=!
not
;
result
=!
_
not
;
(
*
ptrptr
)
++
;
(
*
ptrptr
)
++
;
break
;
break
;
case
AR_MAIN_CMDS
:
case
AR_MAIN_CMDS
:
if
((
equal
&&
main_cmds
!=
i
)
||
(
!
equal
&&
main_cmds
<
i
))
if
((
equal
&&
main_cmds
!=
i
)
||
(
!
equal
&&
main_cmds
<
i
))
result
=
not
;
result
=
_
not
;
else
else
result
=!
not
;
result
=!
_
not
;
(
*
ptrptr
)
++
;
(
*
ptrptr
)
++
;
break
;
break
;
case
AR_FILE_CMDS
:
case
AR_FILE_CMDS
:
if
((
equal
&&
xfer_cmds
!=
i
)
||
(
!
equal
&&
xfer_cmds
<
i
))
if
((
equal
&&
xfer_cmds
!=
i
)
||
(
!
equal
&&
xfer_cmds
<
i
))
result
=
not
;
result
=
_
not
;
else
else
result
=!
not
;
result
=!
_
not
;
(
*
ptrptr
)
++
;
(
*
ptrptr
)
++
;
break
;
break
;
case
AR_TLEFT
:
case
AR_TLEFT
:
if
(
timeleft
/
60
<
(
ulong
)
n
)
if
(
timeleft
/
60
<
(
ulong
)
n
)
result
=
not
;
result
=
_
not
;
else
else
result
=!
not
;
result
=!
_
not
;
if
(
!
result
)
{
if
(
!
result
)
{
noaccess_str
=
text
[
NoAccessTimeLeft
];
noaccess_str
=
text
[
NoAccessTimeLeft
];
noaccess_val
=
n
;
}
noaccess_val
=
n
;
}
break
;
break
;
case
AR_TUSED
:
case
AR_TUSED
:
if
((
time
(
NULL
)
-
logontime
)
/
60
<
(
long
)
n
)
if
((
time
(
NULL
)
-
logontime
)
/
60
<
(
long
)
n
)
result
=
not
;
result
=
_
not
;
else
else
result
=!
not
;
result
=!
_
not
;
if
(
!
result
)
{
if
(
!
result
)
{
noaccess_str
=
text
[
NoAccessTimeUsed
];
noaccess_str
=
text
[
NoAccessTimeUsed
];
noaccess_val
=
n
;
}
noaccess_val
=
n
;
}
...
@@ -381,9 +381,9 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
...
@@ -381,9 +381,9 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
now
=
time
(
NULL
);
now
=
time
(
NULL
);
tm
=
gmtime
(
&
now
);
tm
=
gmtime
(
&
now
);
if
(
tm
==
NULL
||
(
tm
->
tm_hour
*
60
)
+
tm
->
tm_min
<
(
int
)
i
)
if
(
tm
==
NULL
||
(
tm
->
tm_hour
*
60
)
+
tm
->
tm_min
<
(
int
)
i
)
result
=
not
;
result
=
_
not
;
else
else
result
=!
not
;
result
=!
_
not
;
(
*
ptrptr
)
++
;
(
*
ptrptr
)
++
;
if
(
!
result
)
{
if
(
!
result
)
{
noaccess_str
=
text
[
NoAccessTime
];
noaccess_str
=
text
[
NoAccessTime
];
...
@@ -392,9 +392,9 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
...
@@ -392,9 +392,9 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
case
AR_PCR
:
case
AR_PCR
:
if
(
user
->
logons
>
user
->
posts
if
(
user
->
logons
>
user
->
posts
&&
(
!
user
->
posts
||
100
/
(
user
->
logons
/
user
->
posts
)
<
(
long
)
n
))
&&
(
!
user
->
posts
||
100
/
(
user
->
logons
/
user
->
posts
)
<
(
long
)
n
))
result
=
not
;
result
=
_
not
;
else
else
result
=!
not
;
result
=!
_
not
;
if
(
!
result
)
{
if
(
!
result
)
{
noaccess_str
=
text
[
NoAccessPCR
];
noaccess_str
=
text
[
NoAccessPCR
];
noaccess_val
=
n
;
}
noaccess_val
=
n
;
}
...
@@ -404,9 +404,9 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
...
@@ -404,9 +404,9 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
if
(
!
l
)
l
=
1
;
if
(
!
l
)
l
=
1
;
if
(
user
->
dlb
>
user
->
ulb
if
(
user
->
dlb
>
user
->
ulb
&&
(
!
user
->
ulb
||
100
/
(
l
/
user
->
ulb
)
<
n
))
&&
(
!
user
->
ulb
||
100
/
(
l
/
user
->
ulb
)
<
n
))
result
=
not
;
result
=
_
not
;
else
else
result
=!
not
;
result
=!
_
not
;
if
(
!
result
)
{
if
(
!
result
)
{
noaccess_str
=
text
[
NoAccessUDR
];
noaccess_str
=
text
[
NoAccessUDR
];
noaccess_val
=
n
;
}
noaccess_val
=
n
;
}
...
@@ -416,9 +416,9 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
...
@@ -416,9 +416,9 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
if
(
!
i
)
i
=
1
;
if
(
!
i
)
i
=
1
;
if
(
user
->
dls
>
user
->
uls
if
(
user
->
dls
>
user
->
uls
&&
(
!
user
->
uls
||
100
/
(
i
/
user
->
uls
)
<
n
))
&&
(
!
user
->
uls
||
100
/
(
i
/
user
->
uls
)
<
n
))
result
=
not
;
result
=
_
not
;
else
else
result
=!
not
;
result
=!
_
not
;
if
(
!
result
)
{
if
(
!
result
)
{
noaccess_str
=
text
[
NoAccessUDFR
];
noaccess_str
=
text
[
NoAccessUDFR
];
noaccess_val
=
n
;
}
noaccess_val
=
n
;
}
...
@@ -426,9 +426,9 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
...
@@ -426,9 +426,9 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
case
AR_FLAG1
:
case
AR_FLAG1
:
if
((
!
equal
&&
!
(
user
->
flags1
&
FLAG
(
n
)))
if
((
!
equal
&&
!
(
user
->
flags1
&
FLAG
(
n
)))
||
(
equal
&&
user
->
flags1
!=
FLAG
(
n
)))
||
(
equal
&&
user
->
flags1
!=
FLAG
(
n
)))
result
=
not
;
result
=
_
not
;
else
else
result
=!
not
;
result
=!
_
not
;
if
(
!
result
)
{
if
(
!
result
)
{
noaccess_str
=
text
[
NoAccessFlag1
];
noaccess_str
=
text
[
NoAccessFlag1
];
noaccess_val
=
n
;
}
noaccess_val
=
n
;
}
...
@@ -436,9 +436,9 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
...
@@ -436,9 +436,9 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
case
AR_FLAG2
:
case
AR_FLAG2
:
if
((
!
equal
&&
!
(
user
->
flags2
&
FLAG
(
n
)))
if
((
!
equal
&&
!
(
user
->
flags2
&
FLAG
(
n
)))
||
(
equal
&&
user
->
flags2
!=
FLAG
(
n
)))
||
(
equal
&&
user
->
flags2
!=
FLAG
(
n
)))
result
=
not
;
result
=
_
not
;
else
else
result
=!
not
;
result
=!
_
not
;
if
(
!
result
)
{
if
(
!
result
)
{
noaccess_str
=
text
[
NoAccessFlag2
];
noaccess_str
=
text
[
NoAccessFlag2
];
noaccess_val
=
n
;
}
noaccess_val
=
n
;
}
...
@@ -446,9 +446,9 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
...
@@ -446,9 +446,9 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
case
AR_FLAG3
:
case
AR_FLAG3
:
if
((
!
equal
&&
!
(
user
->
flags3
&
FLAG
(
n
)))
if
((
!
equal
&&
!
(
user
->
flags3
&
FLAG
(
n
)))
||
(
equal
&&
user
->
flags3
!=
FLAG
(
n
)))
||
(
equal
&&
user
->
flags3
!=
FLAG
(
n
)))
result
=
not
;
result
=
_
not
;
else
else
result
=!
not
;
result
=!
_
not
;
if
(
!
result
)
{
if
(
!
result
)
{
noaccess_str
=
text
[
NoAccessFlag3
];
noaccess_str
=
text
[
NoAccessFlag3
];
noaccess_val
=
n
;
}
noaccess_val
=
n
;
}
...
@@ -456,9 +456,9 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
...
@@ -456,9 +456,9 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
case
AR_FLAG4
:
case
AR_FLAG4
:
if
((
!
equal
&&
!
(
user
->
flags4
&
FLAG
(
n
)))
if
((
!
equal
&&
!
(
user
->
flags4
&
FLAG
(
n
)))
||
(
equal
&&
user
->
flags4
!=
FLAG
(
n
)))
||
(
equal
&&
user
->
flags4
!=
FLAG
(
n
)))
result
=
not
;
result
=
_
not
;
else
else
result
=!
not
;
result
=!
_
not
;
if
(
!
result
)
{
if
(
!
result
)
{
noaccess_str
=
text
[
NoAccessFlag4
];
noaccess_str
=
text
[
NoAccessFlag4
];
noaccess_val
=
n
;
}
noaccess_val
=
n
;
}
...
@@ -466,9 +466,9 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
...
@@ -466,9 +466,9 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
case
AR_REST
:
case
AR_REST
:
if
((
!
equal
&&
!
(
user
->
rest
&
FLAG
(
n
)))
if
((
!
equal
&&
!
(
user
->
rest
&
FLAG
(
n
)))
||
(
equal
&&
user
->
rest
!=
FLAG
(
n
)))
||
(
equal
&&
user
->
rest
!=
FLAG
(
n
)))
result
=
not
;
result
=
_
not
;
else
else
result
=!
not
;
result
=!
_
not
;
if
(
!
result
)
{
if
(
!
result
)
{
noaccess_str
=
text
[
NoAccessRest
];
noaccess_str
=
text
[
NoAccessRest
];
noaccess_val
=
n
;
}
noaccess_val
=
n
;
}
...
@@ -476,18 +476,18 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
...
@@ -476,18 +476,18 @@ bool sbbs_t::ar_exp(uchar **ptrptr, user_t* user)
case
AR_EXEMPT
:
case
AR_EXEMPT
:
if
((
!
equal
&&
!
(
user
->
exempt
&
FLAG
(
n
)))
if
((
!
equal
&&
!
(
user
->
exempt
&
FLAG
(
n
)))
||
(
equal
&&
user
->
exempt
!=
FLAG
(
n
)))
||
(
equal
&&
user
->
exempt
!=
FLAG
(
n
)))
result
=
not
;
result
=
_
not
;
else
else
result
=!
not
;
result
=!
_
not
;
if
(
!
result
)
{
if
(
!
result
)
{
noaccess_str
=
text
[
NoAccessExempt
];
noaccess_str
=
text
[
NoAccessExempt
];
noaccess_val
=
n
;
}
noaccess_val
=
n
;
}
break
;
break
;
case
AR_SEX
:
case
AR_SEX
:
if
(
user
->
sex
!=
n
)
if
(
user
->
sex
!=
n
)
result
=
not
;
result
=
_
not
;
else
else
result
=!
not
;
result
=!
_
not
;
if
(
!
result
)
{
if
(
!
result
)
{
noaccess_str
=
text
[
NoAccessSex
];
noaccess_str
=
text
[
NoAccessSex
];
noaccess_val
=
n
;
}
noaccess_val
=
n
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment