Posted: Tue Apr 15, 2008 3:03 pm
Yes, I mistakenly tested that against a later version, and then my internets died
Bani's Discussion Forums
https://bani.anime.net/banimod/forums/
https://bani.anime.net/banimod/forums/viewtopic.php?f=13&t=6777
I fixed it via lua in ACpro in the day when it was discovered:UPDATE August 1 2008
etadmin_mod can be tricked into giving people with certain names admin access. See http://www.snl-clan.com/forum/viewtopic.php?f=9&t=9789 for a workaround.
ty SNL|Lucel|STA
I checked this on the server and it says:ReyalP wrote:New update, see first post.
Code: Select all
invalid string bla bla
http://www.snl-clan.com/forum/viewtopic.php?f=9&t=9789roissgil wrote:is there a fix for the ^ at end of name outside of ACPro?
There is additional ; char, which belongs to language C an i guess will create an error in lua...I dnt know why even if i fix your code it is still not working...So i modified your code a bit:if cmd == "callvote" or cmd == "ref" or cmd == "sa" or cmd == "semiadmin" then
local args=et.ConcatArgs(1)
-- et.G_LogPrint(string.format("combinedfixes: client %d %s [%s]\n",cno,cmd,args))
if string.find(args,"[\r\n]") then
et.G_LogPrint(string.format("combinedfixes: client %d bad %s [%s]\n",cno,cmd,args))
return 1;
end
return 0
end
Code: Select all
function et_ClientCommand(cno,cmd)
local msg = ""
local cmd = string.lower(cmd)
local args = et.ConcatArgs(1)
local arg1 = et.trap_Argv(1)
if cmd == "ws" then
local n = tonumber(arg1)
if not n then
et.G_LogPrint(string.format("wsfix: client %d bad ws not a number [%s]\n",cno,tostring(arg1)))
return 1
end
if n < 0 or n > 21 then
et.G_LogPrint(string.format("wsfix: client %d bad ws %d\n",cno,n))
return 1
end
return 0
end
-- modified code from Reyalp
if cmd == "callvote" or cmd == "ref" or cmd == "sa" or cmd == "semiadmin" then
local _, counts = string.gsub (args, "%s", "") -- count spaces
if counts > 1 then
msg = string.format("cpm \"Remove additional spaces!\n")
et.trap_SendServerCommand(cno, msg)
return 1
end
if string.find(args,"%\\") or string.find(args,"%;") then
msg = string.format("cpm \"Invalid string!\n")
et.trap_SendServerCommand(cno, msg)
return 1
end
return 0
end
return 0
end