Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Main
Synchronet
Commits
152f95bc
Commit
152f95bc
authored
Dec 29, 2006
by
rswindell
Browse files
New ARS keywords: DELETED, INACTIVE, and ACTIVE.
parent
6d883b83
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
3 deletions
+57
-3
src/sbbs3/ars.c
src/sbbs3/ars.c
+22
-1
src/sbbs3/ars_defs.h
src/sbbs3/ars_defs.h
+4
-1
src/sbbs3/chk_ar.cpp
src/sbbs3/chk_ar.cpp
+16
-1
src/sbbs3/userdat.c
src/sbbs3/userdat.c
+15
-0
No files found.
src/sbbs3/ars.c
View file @
152f95bc
...
...
@@ -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 200
5
Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 200
6
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
)
...
...
src/sbbs3/ars_defs.h
View file @
152f95bc
...
...
@@ -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 200
5
Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 200
6
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 */
src/sbbs3/chk_ar.cpp
View file @
152f95bc
...
...
@@ -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 200
4
Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 200
6
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
;
...
...
src/sbbs3/userdat.c
View file @
152f95bc
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment