Conversation
isRyven
left a comment
There was a problem hiding this comment.
Well that's some weird script! Not sure if it's in the interest of the collection!
| function et_InitGame() | ||
| et.RegisterModname(modname.." "..version) | ||
| end | ||
| -- Antichat by Ryven |
There was a problem hiding this comment.
Wait what? I have no memory of this script D:
| function et_ClientCommand(clientNum, command) | ||
| if contains(blackList, command) then | ||
| local arg = et.trap_Argv(1) | ||
| if not contains(whitelist, arg) then |
There was a problem hiding this comment.
This won't work in case shrub command will have arguments. Argv 1 will return full text string passed to say or other command, not just the first word of it, instead you would have to partially match the sub string.
| -- Allow only wolfadmin commands to be passed | ||
|
|
||
| local blackList = { "say", "say_team", "say_buddy", "say_teamnl", "m", "pm" } | ||
| local whitelist = { |
There was a problem hiding this comment.
What's the point in hardcoding wolfadmin stuff, like why being responsible for maintaining the list? Instead you could just suggest people to put wofladmin first to load in the lua modules list, then it will be able to parse its own stuff first, then passing control further here.
There was a problem hiding this comment.
Also, there is blackList with uppercase L and also whitelist with lowercase l. This should be standarized to lowercase probably ;)
| -- Antichat by Ryven | ||
| -- Allow only wolfadmin commands to be passed | ||
|
|
||
| local blackList = { "say", "say_team", "say_buddy", "say_teamnl", "m", "pm" } |
There was a problem hiding this comment.
I assume this mod could be effectively called vsay fest :D
No description provided.