READ THE RULES
0 Members and 1 Guest are viewing this topic.
else a nice bot, but you should get into tables.. you will be so happy, each time you add a new command ;).
table = { test1 = function() end, test2 = function() end,}
Now there are 2 commands that don´t work for me: !mm !settings Are my Profiles right? //WickeD
Originally posted by Chilla nighlitch... just one thing, the whois, you took from logger (LIS), well I just modded it to make it a little faster, well excatly to close the socket as soon as possible, but it was actually from tezlo. else a nice bot, but you should get into tables.. you will be so happy, each time you add a new command ;).
function MainCom(curUser,data) data=strsub(data,1,strlen(data)-1) local _,_,cmd = strfind(data, "%b<>%s+(%S+)") if not cmd then cmd = "0" end if (strsub(cmd, 1, 1) ~= Prefix1 and strsub(cmd, 1, 1) ~= Prefix2) then return 0 else cmd = strlower(cmd) if strlen(cmd) > 1 then cmd=strsub(cmd,2,strlen(cmd)) local SendCom = (Com(curUser,data,cmd)) if not SendCom then return 1 else return SendCom end end endend
Originally posted by Optimus Btw, nice bot Night
STATSFUNC = { ["!test"] = function(curUser,data) DoHelp(curUser,data) end,}function DataArrival(curUser,data)if ( strsub(data, 1, 1) == "<" ) then data = strsub(data,strlen(curUser.sName)+4,strlen(data)-1) local _,_,cmd = strfind(data,"^(%S+)") if cmd and STATSFUNC[cmd] then SendToAll(STATSFUNC[cmd](curUser,data)) endendend
By WickeD If you where a girl a kiss you!!! =)