From: <arn...@us...> - 2007-12-28 14:27:56
|
Revision: 113 http://adchpp.svn.sourceforge.net/adchpp/?rev=113&view=rev Author: arnetheduck Date: 2007-12-28 06:27:54 -0800 (Fri, 28 Dec 2007) Log Message: ----------- Script fix Modified Paths: -------------- adchpp/trunk/plugins/Script/examples/access.lua Modified: adchpp/trunk/plugins/Script/examples/access.lua =================================================================== --- adchpp/trunk/plugins/Script/examples/access.lua 2007-12-26 14:55:44 UTC (rev 112) +++ adchpp/trunk/plugins/Script/examples/access.lua 2007-12-28 14:27:54 UTC (rev 113) @@ -438,28 +438,28 @@ if command == "test" then reply(c, "Test ok") - return adchpp.AdcCommand_DONT_SEND + return adchpp.ClientManager_DONT_SEND elseif command == "error" then xxxxyyyy() - return adchpp.AdcCommand_DONT_SEND + return adchpp.ClientManager_DONT_SEND elseif command == "help" then reply(c, "+test, +help, +regme password, +regnick nick password level") - return adchpp.AdcCommand_DONT_SEND + return adchpp.ClientManager_DONT_SEND elseif command == "regme" then if not parameters:match("%S+") then reply(c, "You need to supply a password without whitespace") - return adchpp.AdcCommand_DONT_SEND + return adchpp.ClientManager_DONT_SEND end register_user(c:getCID():toBase32(), c:getField("NI"), parameters, 1) reply(c, "You're now registered") - return adchpp.AdcCommand_DONT_SEND + return adchpp.ClientManager_DONT_SEND elseif command == "regnick" then local nick, password, level = parameters:match("^(%S+) (%S+) (%d+)") if not nick or not password or not level then reply(c, "You must supply nick, password and level!") - return adchpp.AdcCommand_DONT_SEND + return adchpp.ClientManager_DONT_SEND end level = tonumber(level) @@ -475,17 +475,17 @@ if not my_user then reply(c, "Only registered users may register others") - return adchpp.AdcCommand_DONT_SEND + return adchpp.ClientManager_DONT_SEND end if level >= my_user.level then reply(c, "You may only register to a lower level than your own") - return adchpp.AdcCommand_DONT_SEND + return adchpp.ClientManager_DONT_SEND end if level < 1 then reply(c, "Level too low") - return adchpp.AdcCommand_DONT_SEND + return adchpp.ClientManager_DONT_SEND end register_user(cid, nick, password, level) @@ -496,7 +496,7 @@ reply(other, "You've been registered with password " .. password) end - return adchpp.AdcCommand_DONT_SEND + return adchpp.ClientManager_DONT_SEND elseif command == "stats" then local now = os.time() local scripttime = os.difftime(now, start_time) @@ -537,7 +537,7 @@ str = str .. recvCalls .. "\tReceive calls (" .. adchpp.Util_formatBytes(recvBytes/recvCalls) .. "/call)\n" reply(c, str) - return adchpp.AdcCommand_DONT_SEND + return adchpp.ClientManager_DONT_SEND end return 0 @@ -558,6 +558,7 @@ end local function onReceive(c, cmd, override) + cmdstr = cmd:getCommandString() if stats[cmdstr] then stats[cmdstr] = stats[cmdstr] + 1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |