G
Guest
REGULAR EXPRESSION
PROGRAM: Quake2
CODE: C+
REGULAR EXPRESSION REQUEST EXPLINATION
I am running a quake2 server with a program that has the capabilities to disable (client-side) commands or any
part of a string pass on to the server. So,
anyone who connects to my game server and tries to issue a command that is on the "command BAN list" will not
work. The good news is, is that the programmer intelligently included the ability to match regular expression
matching. Now what I want to do is simple. I want to prevent someone typing any type of file extention. On
the latter part of the filename after the '.' and including the '.' dot. I am allowing people to change
maps via LRCON from the program dll Q2admin. I have a banlist.txt file were I can place any regular expresssion match,
and if client tries to send the command to my gaming server and is checked inside this banlist.txt file,
any matches in this banlist.txt file command will be ignored.
This is great because there is one fucked up flaw in the mod I'm running. It could also be Quake2's code's fault.
When someone has regular rcon, or lrcon, and from WAN or LAN side, if the include the *.bsp extention on to
the command it crashes the server. Also, if they type a name of a map that DOES NOT EXIST in the /maps
direcotry, EX., abcd.bsp, and anyone tries to change to this map it crashes the server.
All I want to do is prevent, BAN the adding of the extenstion "*.bsp", Or better yet, is to totally
make the server ignore ANY FILE EXTENTION ".*" including the '.' as well. I only want them to be allowed
to type in the filename.
They can type
mapname
all they want, but I do not want to allow
mapname.bsp or
mapname.123 or
mapname.* or
mapname.
IMPORTANT: here is the entire command the clients have to type in order to send a command to the server
to change a map:
lrcon map map q2dm1
EXPLINATION: The 'lrocn' part is allowed. the first 'map', is allowed, the second 'map', is allowed,
the mapname 'q2dm1' is allowed. But what is not allowed is for someone to add a dot '.' after the
mapname q2dm1 like so "q2dm1." nor what is not allowed is to add any type of extention what so ever
like so "q2dm1.bsp" or "q2dm1.123" or "q2dm1.1Abcde" etc..
What regular expression do need to put into the BANLIST.TXT file to make the server ignore
commands sent to my server with a file extension attached to the mapname?
Here are the only REGEX examples in the banlist.txt the author gave me, or better yet here is the complete
BANLIST or Q2adminDisable.txt file, same thing.
__COPY OF banlist.txt file_____________________________________
;
;Disable client commands.
;
;This lists all the cleint mod commands that will be disabled
;
;The file q2admindisable.txt is read from the quake2 directory and the mod
;directory. This allows server admin's to setup disabled commands as
;global and mod specific as well.
;
;The format for q2admindisable.txt is as follows:
;
;Lines beginning with a ';' are comments.
;
;disable command format:
;<disabletype><command to disable>
;
; <floodtype> can be one of three values:
; 'EX:' Exact match.
; 'SW:' Starts with match.
; 'RE:' Regular Expression match.
;
;e.g.
;SW:say_team
;EX:team
;RE:^say.*
;
; Note that internal commands to quake2 can't be monitored as
; mod's don't see these client commands. e.g. name, cl_maxfps, rate, etc
;
;There is a limit of 1024 disable commands that can be setup.
;
_________________________________________
NOw what I do want to allow is for the client to do this:
lrcon map map q2dm1
I DO NOT WANT TO ALLOW THIS: ".bsp" QUAKE SERVER ONLY NEEDS THE MAP NAME WHICH IS THE NAME OF THE FILE AND
NOT THE '.' NOR THE 'BSP'. I WANT TO TOTALLY BAN, ".BSP" part of the client's command sent to the server.
lrcon map map q2dm1.bsp
anyhelp with this is very much appreciated.
vynum
PROGRAM: Quake2
CODE: C+
REGULAR EXPRESSION REQUEST EXPLINATION
I am running a quake2 server with a program that has the capabilities to disable (client-side) commands or any
part of a string pass on to the server. So,
anyone who connects to my game server and tries to issue a command that is on the "command BAN list" will not
work. The good news is, is that the programmer intelligently included the ability to match regular expression
matching. Now what I want to do is simple. I want to prevent someone typing any type of file extention. On
the latter part of the filename after the '.' and including the '.' dot. I am allowing people to change
maps via LRCON from the program dll Q2admin. I have a banlist.txt file were I can place any regular expresssion match,
and if client tries to send the command to my gaming server and is checked inside this banlist.txt file,
any matches in this banlist.txt file command will be ignored.
This is great because there is one fucked up flaw in the mod I'm running. It could also be Quake2's code's fault.
When someone has regular rcon, or lrcon, and from WAN or LAN side, if the include the *.bsp extention on to
the command it crashes the server. Also, if they type a name of a map that DOES NOT EXIST in the /maps
direcotry, EX., abcd.bsp, and anyone tries to change to this map it crashes the server.
All I want to do is prevent, BAN the adding of the extenstion "*.bsp", Or better yet, is to totally
make the server ignore ANY FILE EXTENTION ".*" including the '.' as well. I only want them to be allowed
to type in the filename.
They can type
mapname
all they want, but I do not want to allow
mapname.bsp or
mapname.123 or
mapname.* or
mapname.
IMPORTANT: here is the entire command the clients have to type in order to send a command to the server
to change a map:
lrcon map map q2dm1
EXPLINATION: The 'lrocn' part is allowed. the first 'map', is allowed, the second 'map', is allowed,
the mapname 'q2dm1' is allowed. But what is not allowed is for someone to add a dot '.' after the
mapname q2dm1 like so "q2dm1." nor what is not allowed is to add any type of extention what so ever
like so "q2dm1.bsp" or "q2dm1.123" or "q2dm1.1Abcde" etc..
What regular expression do need to put into the BANLIST.TXT file to make the server ignore
commands sent to my server with a file extension attached to the mapname?
Here are the only REGEX examples in the banlist.txt the author gave me, or better yet here is the complete
BANLIST or Q2adminDisable.txt file, same thing.
__COPY OF banlist.txt file_____________________________________
;
;Disable client commands.
;
;This lists all the cleint mod commands that will be disabled
;
;The file q2admindisable.txt is read from the quake2 directory and the mod
;directory. This allows server admin's to setup disabled commands as
;global and mod specific as well.
;
;The format for q2admindisable.txt is as follows:
;
;Lines beginning with a ';' are comments.
;
;disable command format:
;<disabletype><command to disable>
;
; <floodtype> can be one of three values:
; 'EX:' Exact match.
; 'SW:' Starts with match.
; 'RE:' Regular Expression match.
;
;e.g.
;SW:say_team
;EX:team
;RE:^say.*
;
; Note that internal commands to quake2 can't be monitored as
; mod's don't see these client commands. e.g. name, cl_maxfps, rate, etc
;
;There is a limit of 1024 disable commands that can be setup.
;
_________________________________________
NOw what I do want to allow is for the client to do this:
lrcon map map q2dm1
I DO NOT WANT TO ALLOW THIS: ".bsp" QUAKE SERVER ONLY NEEDS THE MAP NAME WHICH IS THE NAME OF THE FILE AND
NOT THE '.' NOR THE 'BSP'. I WANT TO TOTALLY BAN, ".BSP" part of the client's command sent to the server.
lrcon map map q2dm1.bsp
anyhelp with this is very much appreciated.
vynum