PtokaX forum

Archive => Archived 5.0 boards => Request for scripts => Topic started by: S.T. on 05 April, 2005, 21:01:05

Title: Selfreg
Post by: S.T. on 05 April, 2005, 21:01:05
Can Anyone Convert SelfReg for LUA 5 Or Tell Me If There Is A Similar Script.  ?(  ?(     Thanks
Title:
Post by: jiten on 05 April, 2005, 21:19:27
Check this (http://board.univ-angers.fr/thread.php?threadid=4101&boardid=28&sid=9e9aa8db4c8110308c0f497bce2e2b81)  thread.

Cheers
Title:
Post by: S.T. on 07 April, 2005, 10:39:13
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.
Title:
Post by: jiten on 07 April, 2005, 11:21:26
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.
Title:
Post by: S.T. on 07 April, 2005, 12:08:53
thanks man it works just fine ;)
Title:
Post by: jiten on 07 April, 2005, 13:25:07
yw  :]
Title: Re: Selfreg
Post by: piraya on 14 October, 2006, 20:33:28
Nice thets woth im been looking for but i wont it in lua 5.1 if possible tnx  ;D
Title: Re: Selfreg
Post by: bastya_elvtars on 14 October, 2006, 20:42:56
--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
Title: Re: Selfreg
Post by: piraya on 14 October, 2006, 20:52:46
 ;D ;D ;D Tnx man your a angel  8)