--// ReG BoT made by 6Marilyn6Manson6 22/07/2006
------------------------------------------------------
tSetBotName = "ReG"
------------------------------------------------------
function Main()
if tSetBotName ~= frmHub:GetHubBotName() then
frmHub:RegBot(tSetBotName)
end
end
------------------------------------------------------
function ChatArrival(usr, data)
data = string.sub(data,1,string.len(data)-1)
local s,e,cmd = string.find(data, "%b<>%s+(%S+)")
if (usr.iProfile ~= -1) then
usr:SendPM(tSetBotName, "Your can't use !regme command ;).")
end
if (usr.iProfile == -1) then
if (cmd == "!regme") then
local s,e,sPass = string.find(data, "%b<>%s+%S+%s+(%S+)")
if (sPass == nil) then
usr:SendPM(tSetBotName, "Syntax Error, !regme <password>, you must write a password.")
elseif (string.find(sPass, "[%c|\n\r]")) then
usr:SendPM(tSetBotName, "Invalid Password. Try Again.")
elseif (string.find(usr.sName, "[%c|\n\r]")) then
usr:SendPM(tSetBotName, "Your nick is invalid. Please choose a new one.")
else
AddRegUser(usr.sName,sPass,3)
usr:SendPM(tSetBotName, "You are Registered now. Nick: "..usr.sName.." , Password: "..sPass.." . Please reconnect to make effect ;).")
end
end
return 1
end
end
------------------------------------------------------
function ToArrival(usr, data)
local s,e,to,from,text = string.find(data, "%$To:%s(%S+)%sFrom:%s(%S+)%s$(.*)$")
if to == tSetBotName then
ChatArrival(usr, data)
end
end
------------------------------------------------------
--// 6Marilyn6Manson6
Marylin: why don't you try generating a password if the user doesn't provide one ?
hello,
Can you add to the script this -> people have to agree with Terms & Conditions before they can reg
using terms&condictions.txt file ???
Another quality scripts by 6M6M6 lol
lmfao indeed
Hi
Its possible addy this message for this script?
Exemple.
User type !regme password and type enter and bot send a private message whit password/nick but don?t send nothing for main chat
I want a message in main chat.
Exemple: New user are registred in the hub. Welcome xxxx!
Sory about my bad inglish
Just one line:
usr:SendPM(tSetBotName, "You are Registered now. Nick: "..usr.sName.." , Password: "..sPass.." . Please reconnect to make effect ;).")
SendToAll(tSetBotName,"Welcome new registered user "..usr.sName.."!")
Hi again
Its possible add this in one script?
EXample
User type !regme password and type enter but if user don?t have Tag Contry bot don?t reg.
And if its possible i want a table for creat Tag Contrys by respective Range IP