Regme (request for reg) - Page 2
 

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

Regme (request for reg)

Started by Jerry, 18 May, 2005, 22:31:35

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

TTB

In the main chat will appear the message when a user has regged himself. Would you like to have that notice also to the OPs? Easy to do  :D

Please define you request
TTB

(? ?.??.-> Admin @ Surfnet hubs <-.??.???)

Dj_OcTaGoN

Ah yeah sry :D

A PM to OPs only (not in mainchat) when the user uses the +pass cmd.

The other one is that when the user use +regme cmd he will receive a message that a Operator must accept his register request :)

cheers


TTB

Try thisone (message to user can be changed in settings part):

-- Reg note to OPs by TTB v.2
-- Request by Jerry
-- 18-05-05
-- Added: User can reg himself after he is put in table by Operator, timer also added.
-- Thanx Madman for the finishing the notification function 
-- Added: PM to user with hub info and username + pasw. (31-05-05)
-- Little changes for Dj_OcTaGoN (01-06-05)
-----------------------------------

-- ## Settings ## --


--> Here the text to the user who has asked to be regged with command "regcmd"
msguser = "Your request to REG you has been send! Please be patient, an OP will considder your request!"

regcmd = "+regme"
regopcmd = "+regreg"
cpaswcmd = "+pass"

bot = "--REG-Note--"

loginmin = 5	-- time the user has to confirm with his pasw. Else the user will be deleted!

-- ## Please don't change below ## --

RegTable = {}

function Main()
	frmHub:RegBot(bot)
	SetTimer(1000*60)
	StartTimer()
end

function ChatArrival(user,data)
	data=string.sub(data,1,string.len(data)-1)
	s,e,regger = string.find(data, "%b<>%s+(%S+)")
	if regger and regger == regcmd and user.iProfile == -1 then
		SendPmToOps(bot, "The user:  "..user.sName.."  wants to be regged. Please help him.")
		user:SendData(bot, msguser)
		return 1
	elseif regger == regopcmd and user.bOperator then
		local s,e,name = string.find(data, "%b<>%s+%S+%s+(%S+)")
		if name == nil then
			user:SendData(bot, "*** Syntax error! Please use: "..regopcmd.." ")
			return 1
		else
			RegTable[name] = loginmin
			SendPmToOps(bot, "User: "..name.." has been registrated by: "..user.sName..". He has "..loginmin.." min. to log in!")
			SendPmToNick(name,bot, "You have been registered! Please type "..cpaswcmd.."  to complete your registration! You have "..loginmin.." minutes to register!")
			return 1
		end
	elseif regger == cpaswcmd and user.iProfile == -1 then
		local s,e,pasw = string.find(data, "%b<>%s+%S+%s+(%S+)")
		if pasw == nil then
			user:SendPM(bot, "*** Syntax error! Please use: "..cpaswcmd.." ")
			return 1
		else
			if RegTable[user.sName] ~= nil then
				AddRegUser(user.sName.."",pasw, 3)
				RegTable[user.sName] = nil
				SendPmToNick(user.sName,bot, "You have been registered!\r\n\r\n\t"..string.rep("-",60).."\r\n\tUsername:\t"..user.sName.."\r\n\t"..
				"Password:\t"..pasw.."\r\n\tHubname:\t"..frmHub:GetHubName().."\r\n\tHub Adress:\t"..frmHub:GetRegServer().."\r\n\t"..
				string.rep("-",60).."\r\n\tPlease add this to your Favarites!")
				SendPmToOps(bot, "*** Username = "..user.sName.." registered himself succesfully, userlevel = REG.")
				return 1
			else
				user:SendPM(bot,"You are not in memory to be registrated! An OP has to REG you first temporary!")
				return 1
			end
		end
	end
end

function OnTimer()
	for user,timer in pairs(RegTable) do
		if timer > 0 then
			RegTable[user] = RegTable[user] - 1
		else
			notification(user)
			RegTable[user] = nil
		end
	end
end

function notification(user)
	SendPmToOps(bot, "User: "..user.." didn't REG him/herself after "..loginmin.." min.")
	DelRegUser(user)
	user = GetItemByName(user)
	if user then
		user:SendPM(bot, "Your time to log in has been expired. Please type again: '"..regcmd.."'  to let an OP reg you...")
	end
	return 1
end


ToArrival = ChatArrival
TTB

(? ?.??.-> Admin @ Surfnet hubs <-.??.???)

Dj_OcTaGoN

Thx m8 will try it our right away  :D

cheers//Octa


Genius

Hi

I try the comand +regme and receive this:

<--REG-Note--> The user:  Genius  wants to be regged. Please help him.

Can?t modify script for this:

<--REG-Note--> Please Op, regist user Genius, the password is xxxx

Sory About my inglish

TTB

The user gives the password with the +pass command!

This:
<--REG-Note--> The user: Genius wants to be regged. Please help him.
is when a user types "+regme".

The meaning of this script is that users can reg themselves.
TTB

(? ?.??.-> Admin @ Surfnet hubs <-.??.???)

SMF spam blocked by CleanTalk