PtokaX forum
Archive => Archived 4.0 boards => Finished Lua 4 scripts => Topic started by: Loading on 27 June, 2005, 12:30:23
hello ppl
i have tuis script :
--## Self Register 1.0
--## Secure Pass and Nick (thanks to RabidWombat)
--## Made by nErBoS
--## Updated to Lua 5 by Pothead
--## Commands;
--## !regme - Register the user who uses the command
--
-- +Mod request by Mutor 6/26/05 request by Loading
-- +Added User, Op and Main chat message
-- +Added check if nick is already registered
--
sBot = "Reg-Bot"
function Main()
frmHub:RegBot(sBot)
end
function ChatArrival(user, data)
if (string.sub(data,1,1) == "<" or string.sub(data,1,5+strlen(sBot)) == "$To: "..sBot) then
data = string.sub(data,1,string.len(data)-1)
s,e,cmd = string.find(data, "%b<>%s+(%S+)")
if (cmd == "!regme") then
if not frmHub:isNickRegged(user.sName) then
local s,e,pass = string.find(data, "%b<>%s+%S+%s+(%S+)")
if (pass == nil) then
user:SendData(sBot, "Syntax Error, !regme , you must write a password.")
elseif (string.find(pass, "[%c|\n\r]")) then
user:SendData(sBot, "Invalid Password. Try Again.")
elseif (string.find(user.sName, "[%c|\n\r]")) then
user:SendData(sBot, "Your nick is invalid. Please choose a new one.")
else
AddRegUser(user.sName, pass, 3)
local OpMsg="The User ( "..user.sName.." )\r\n"..
"With the IP: ( "..user.sIP.." )\r\n"..
"With this Share: ( "..user.iShareSize.." )\r\n"..
"With this Connection: ( "..user.sConnection.." )\r\n"..
"With this Mode: ( "..user.sMode.." )\r\n"..
"With this E-Mail: ( "..user.sEmail.." )\r\n"..
"With this Client: ( "..user.sClient.." )\r\n\r\n"..
"Registered Theirself \r\n"..
"With the Pass: ( "..pass.." )\r\n"
SendPmToOps(sBot,OpMsg)
local UserPm="You are Now Registered\r\n"..
"With the Nick: ( "..user.sName.." )\r\n"..
"With the pass: ( "..pass.." )\r\n"..
"Your IP: ( "..user.sIP.." )\r\n"..
"Your Share: ( "..user.iShareSize.." )\r\n"..
"Your Connection: ( "..user.sConnection.." )\r\n"..
"Your Mode: ( "..user.sMode.." )\r\n"..
"Your E-Mail: ( "..user.sEmail.." )\r\n"..
"Your Client: ( "..user.sClient.." )\r\n\r\n"..
"***Please reconnect and type your password.***\r\n"
user:SendPM(sBot,UserPm)
local MainMsg="\r\n"..
"(\ ,_____,-/) \r\n"..
"_.-'-.( d\_/b ).-'-._ \r\n"..
"/'.-' ' .---. ' '-. \ The User ( "..user.sName.." ) Registered Theirself \r\n"..
"/' .' (= (_) =) '. \ \r\n"..
"/' .', -.__.-.__.-' ,'. \ WELCOME TO "..string.upper(frmHub:GetHubName()).." !\r\n"..
"( .'. V V ; '. ) \r\n"..
"( :: -,__.-.__,-' :: ) \r\n"..
"} / :. .:' \ { \r\n"..
"} / :. :' \ { \r\n"..
"} ( ( :. .: ) ) { \r\n"..
"( ( ( :. :' ) ) ) \r\n"..
"( ( \ :. .: / ) ) \r\n"..
"( ( \ :. .:'/ ) ) \r\n"..
") ( \ :. .:'/' ) ( \r\n"..
"( )_ ) :._.:' ( _( ) \r\n"..
"\ ' _) .' . (_ / \r\n"..
"\ '_) / .'' ''. \ (_ / \r\n"..
"'' \ ( ) / '' \r\n"..
"___ '.'. .'.' ___ \r\n"..
". ''''''-- _) (_'--'''''' \r\n"..
"(_(_(___...--''' '''--...___)_)_) \r\n"
SendToAll(MainMsg)
end
return 1
else
user:SendData("\t\t*** Sorry, the username "..user.sName.." is already registered")
return 1
end
end
end
end
i run the command !regme
and do anything i turned off the self reg of my roboccop and restart the hub and the scripts and the command don't do nothing no message in mainchat no message for the users and ops nothing at all
and is no error in the script , the script in ptokax don't stop because is no error in them
the command don't show in mainchat and the user is not registered
it is the problem
i think is because the self reg os the robocop
i'm running Ptokax 0.3.3.0.b17.04.nt.dbg and robocop v10.01e
can anyone helpme ?
best regards
Loading