ReG BoT
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

ReG BoT

Started by 6Marilyn6Manson6, 24 July, 2006, 14:32:16

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

6Marilyn6Manson6

--// 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

Herodes

Marylin: why don't you try generating a password if the user doesn't provide one ?

badtrip

hello,

Can you add to the script this -> people have to agree with Terms & Conditions before they can reg

using terms&condictions.txt  file ???

Samantha

Another quality scripts by 6M6M6 lol

Psycho_Chihuahua

PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

Genius

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

Thor

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.."!")

Genius

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

SMF spam blocked by CleanTalk