Can Anyone Convert SelfReg for LUA 5 Or Tell Me If There Is A Similar Script. ?( ?( Thanks
Check this (http://board.univ-angers.fr/thread.php?threadid=4101&boardid=28&sid=9e9aa8db4c8110308c0f497bce2e2b81) thread.
Cheers
It's not what I want. I would like a script that when a user types +regme to automatically add [Reg] in front of his nick and tell him that his nick is [Reg]user and his pass.
Try this one:
--Requested by Cp6uja
--Made by nErBoS
--Converted to Lua 5 by jiten
sBot = "RegisterYourName"
function Main()
frmHub:RegBot(sBot)
end
function ChatArrival(user, data)
data = string.sub(data,1,string.len(data)-1)
s,e,cmd = string.find(data, "%b<>%s+(%S+)")
if (cmd == "+regme") then
local s,e,pass = string.find(data, "%b<>%s+%S+%s+(%S+)")
if (pass == nil) then
user:SendPM(sBot, "Syntax Error, +regme yourpassword, you must choose a password.")
else
AddRegUser("[REG]"..user.sName.."", pass, 3)
SendToOps(sBot, "The user [REG]"..user.sName.." has registered himself.")
user:SendPM(sBot, "You have been succesfully registered.")
user:SendPM(sBot, "Your nick is [REG]"..user.sName.." and your password is "..pass)
user:SendPM(sBot, "Please reconnect and type in your password.")
end
return 1
end
end
ToArrival = ChatArrival
Best regards.
thanks man it works just fine ;)
yw :]
Nice thets woth im been looking for but i wont it in lua 5.1 if possible tnx ;D
--Requested by Cp6uja
--Made by nErBoS
--Converted to Lua 5 by jiten
-- Lua 5.1 version by bastya_elvtars
sBot = "RegisterYourName"
function Main()
frmHub:RegBot(sBot)
end
function ChatArrival(user, data)
data = string.sub(data,1,string.len(data)-1)
cmd = string.match(data, "%b<>%s+(%S+)")
if (cmd == "+regme") then
local pass = string.match(data, "%b<>%s+%S+%s+(%S+)")
if (pass == nil) then
user:SendPM(sBot, "Syntax Error, +regme yourpassword, you must choose a password.")
else
AddRegUser("[REG]"..user.sName.."", pass, 3)
SendToOps(sBot, "The user [REG]"..user.sName.." has registered himself.")
user:SendPM(sBot, "You have been succesfully registered.")
user:SendPM(sBot, "Your nick is [REG]"..user.sName.." and your password is "..pass)
user:SendPM(sBot, "Please reconnect and type in your password.")
end
return 1
end
end
ToArrival = ChatArrival
;D ;D ;D Tnx man your a angel 8)