PtokaX forum

Archive => Archived 5.0 boards => Request for scripts => Topic started by: CyberChris on 28 July, 2006, 18:04:28

Title: search bot ...
Post by: CyberChris on 28 July, 2006, 18:04:28
Hi people !
I've request :
I search for a script who regged user by ops.
ex : +addreg reg <nick> <pass>
       +delreg <nick>
more : +showregs , showvips...
If it add ==> +regme , that so funny for me ...

Because i'm french and me and my friends read english difficult ...
Can you help me please ?
(Sorry for my very bad english)
Respect for all , cyberchris

Title: Re: search bot ...
Post by: Naithif on 14 August, 2006, 00:48:00
Hi

Anyway, is there a way of self-registration in the new PtokaX? I couldn't find it (not if i would use it, just curious)  ;D

(man it's because 2 o' clock here or it's just me?  :) )

Cheers :)
Title: Re: search bot ...
Post by: Naithif on 14 August, 2006, 01:56:59
Well then

:edit  post removed
:edit2 sorry for posting something that already exists in other form, just tried to help
Title: Re: search bot ...
Post by: bastya_elvtars on 14 August, 2006, 02:12:17
Quote from: Naithif on 14 August, 2006, 01:56:59
Well then

:edit  post removed
:edit2 sorry for posting something that already exists in other form, just tried to help

Could you please post it again? It is a misunderstanding that's going on.
Title: Re: search bot ...
Post by: Naithif on 14 August, 2006, 02:16:00
The script already exist in some other form, so my version isn't needed that's all
Off to sleep
Title: Re: search bot ...
Post by: [HE]Newbie on 15 August, 2006, 04:06:06
Here you go.., Didn't tested it but post your questions or errors

-- regme script v1.0
-- Allows users to register themself

sBot = "Register-Bot"


function ChatArrival(CurUser, Data)
Data=string.sub(Data,1,-2)
local s,e,cmd=string.find(Data, "%b<>%s+[%!%+%?%#%?%-](%S+)")
if cmd then
local tCmds = {
["regme"] = function(CurUser, Data)
local s,e,passw = string.find(Data, "%b<>%s+%S+%s+(%S+)")
if (passw == nil) then
CurUser:SendData(sBot, "*** Fatal error, You must write a password")
elseif (string.find(pass, "[%c|\n\r]")) then
CurUser:SendData(sBot, "*** Fatal error, You used an invalid password, please try again")
elseif (string.find(CurUser.sName, "[%c|\n\r]")) then
CurUser:SendData(sBot, "*** Fatal error, You used an invalid nickname, please try again")
else
AddRegUser(CurUser.sName, pass, 3)
SendToOps(sBot, "User "..CurUser.sName.." used self-registration and is now registered with us!")
sendtouser = "\r\n"..
"? ? ? ? ? ? ? ? ? ? ? ?You are now registered with information: \r\n"..
"? ? ? ? ? ? ? ? ? ? ? ?=====================================================? ?\r\n"..
"? ? ? ? ? ? ? ? ? ? ? ?Nickname :? "..CurUser.sName.."\r\n"..
"? ? ? ? ? ? ? ? ? ? ? ?Password :? "..pass.."\r\n"..
"? ? ? ? ? ? ? ? ? ? ? ?Account :? Registered user\r\n"..
"? ? ? ? ? ? ? ? ? ? ? ?====================================================="
CurUser:SendData(sBot, sendtouser)
end
end,
}
if tCmds[cmd] then
return tCmds[cmd](CurUser,Data),1
end
end
end

-- [NL][Newbie][NL] 2006,


Greetz Newbie!