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
6dd33529
Commit
6dd33529
authored
23 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Added MATCHUSER function to get the number of a user by name.
parent
dc8152d1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/sbbs3/baja.c
+6
-1
6 additions, 1 deletion
src/sbbs3/baja.c
src/sbbs3/cmdshell.h
+1
-0
1 addition, 0 deletions
src/sbbs3/cmdshell.h
src/sbbs3/execmisc.cpp
+13
-0
13 additions, 0 deletions
src/sbbs3/execmisc.cpp
with
20 additions
and
1 deletion
src/sbbs3/baja.c
+
6
−
1
View file @
6dd33529
...
@@ -2236,6 +2236,11 @@ void compile(char *src)
...
@@ -2236,6 +2236,11 @@ void compile(char *src)
if
(
!
stricmp
(
p
,
"FINDUSER"
))
{
if
(
!
stricmp
(
p
,
"FINDUSER"
))
{
fprintf
(
out
,
"%c"
,
CS_FINDUSER
);
fprintf
(
out
,
"%c"
,
CS_FINDUSER
);
continue
;
}
continue
;
}
if
(
!
stricmp
(
p
,
"MATCHUSER"
))
{
fprintf
(
out
,
"%c%c"
,
CS_VAR_INSTRUCTION
,
MATCHUSER
);
writecrc
(
src
,
arg
);
writecrc
(
src
,
arg2
);
continue
;
}
if
(
!
stricmp
(
p
,
"LOG"
))
{
if
(
!
stricmp
(
p
,
"LOG"
))
{
if
(
!
(
*
arg
))
break
;
if
(
!
(
*
arg
))
break
;
...
@@ -3367,7 +3372,7 @@ void compile(char *src)
...
@@ -3367,7 +3372,7 @@ void compile(char *src)
}
}
char
*
banner
=
"
\n
"
char
*
banner
=
"
\n
"
"BAJA v2.3
1
- Synchronet Shell/Module Compiler - "
"BAJA v2.3
2
- Synchronet Shell/Module Compiler - "
"Copyright 2001 Rob Swindell
\n
"
;
"Copyright 2001 Rob Swindell
\n
"
;
char
*
usage
=
"
\n
"
char
*
usage
=
"
\n
"
...
...
This diff is collapsed.
Click to expand it.
src/sbbs3/cmdshell.h
+
1
−
0
View file @
6dd33529
...
@@ -463,6 +463,7 @@ enum {
...
@@ -463,6 +463,7 @@ enum {
,
COPY_CHAR
// Copy cmdkey to int var or str var
,
COPY_CHAR
// Copy cmdkey to int var or str var
,
SHIFT_TO_FIRST_CHAR
// Shift str var to first occurance of static char
,
SHIFT_TO_FIRST_CHAR
// Shift str var to first occurance of static char
,
SHIFT_TO_LAST_CHAR
// Shift str var to last occurance of static char
,
SHIFT_TO_LAST_CHAR
// Shift str var to last occurance of static char
,
MATCHUSER
// Set int var to user number of user name (str var)
};
};
/* Preceeded by CS_STR_FUNCTION */
/* Preceeded by CS_STR_FUNCTION */
...
...
This diff is collapsed.
Click to expand it.
src/sbbs3/execmisc.cpp
+
13
−
0
View file @
6dd33529
...
@@ -987,6 +987,19 @@ int sbbs_t::exec_misc(csi_t* csi, char *path)
...
@@ -987,6 +987,19 @@ int sbbs_t::exec_misc(csi_t* csi, char *path)
csi
->
logic
=
LOGIC_TRUE
;
csi
->
logic
=
LOGIC_TRUE
;
return
(
0
);
return
(
0
);
case
MATCHUSER
:
lp
=
getintvar
(
csi
,
*
(
long
*
)
csi
->
ip
);
csi
->
ip
+=
4
;
pp
=
getstrvar
(
csi
,
*
(
long
*
)
csi
->
ip
);
csi
->
ip
+=
4
;
if
(
lp
)
{
if
(
pp
&&
*
pp
)
*
lp
=
matchuser
(
&
cfg
,
*
pp
);
else
*
lp
=
0
;
}
return
(
0
);
default
:
default
:
errormsg
(
WHERE
,
ERR_CHK
,
"var sub-instruction"
,
*
(
csi
->
ip
-
1
));
errormsg
(
WHERE
,
ERR_CHK
,
"var sub-instruction"
,
*
(
csi
->
ip
-
1
));
return
(
0
);
}
return
(
0
);
}
...
...
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