autoregister script
 

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

autoregister script

Started by henry_ok, 09 February, 2004, 17:06:11

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

henry_ok

Hi!

Is there an script for autoregister user?

I have ptokax TD4
 

Thanks! :]

Smulf

Next time try to search after it I know there's plenty...<-- I'm not good at it my self, but I'm trying:D And I also know that the moderators appreciates it...:) Hob this is what you are searching for...

Bot = "UserREG"

function Main()
end

function DataArrival(user, data) 
	if (strsub(data, 1, 1) == "<") then
		data=strsub(data,1,strlen(data)-1)
		local _,_,cmd=strfind(data, "%b<>%s+(%S+)") 

		if not cmd then return 0; end

		cmd = strlower(cmd)

		if (cmd =="!regme") and not user.bOperator then
			local _,_,cmd,AddPass = strfind( data, "%b<>%s+(%S+)%s+(.+)" )

			if (AddPass ~= nil and strfind(AddPass, "%W") == nil) then
				AddRegUser(user.sName, AddPass,3) 
				user:SendData(Bot," "..user.sName.."  *** You have been succesfull added as new Registred user!! ***")
				user:SendData(Bot, "Your password is:  "..AddPass.."  Reconnect and use that!!")
			else
				user:SendData(Bot,"*** Syntax: !regme  ***");
			end

			return 1;
		elseif (cmd =="!showregs") then
			local ru = GetUsersByProfile(GetProfileName(3))
			for i, n in ru do
				SendPmToNick(user.sName, Bot, n)
			end
		end
	end
end


If this wasn't what you where searching for, my mistake...
[Smulf]

henry_ok

Isn't  there an script for fix an password for hub and automatically register user?

nErBoS

I didn't understood your request, you want a script to to change the password, or a script to auto-register a user by giving a password when he connects in the hub ??

Best regards, nErBoS
--## nErBoS Spot ##--

henry_ok

yes, a script to auto-register a user by giving a password when he connects in the hub.......


thanks! :-)

nErBoS

It can be done but I think thats not good for your Hub,

For example if someone is using the nick fery and changes to feryy now you have the same user with to nicks and you will get your hubsoftware full by nothing if think that evryone is free to register themselves if they want to.

Do you realy want a script to do that ??

Best regards, nErBoS
--## nErBoS Spot ##--

NotRabidWombat

DO NOT USE THE ABOVE SCRIPT.

(I only use all caps when I mean it).

Ptaczek, the communitty NEEDS that fix.

-NotRabidWombat


I like childish behavior. Maybe this post will be deleted next.

henry_ok

#7
QuoteOriginally posted by nErBoS
It can be done but I think thats not good for your Hub,

For example if someone is using the nick fery and changes to feryy now you have the same user with to nicks and you will get your hubsoftware full by nothing if think that evryone is free to register themselves if they want to.

Do you realy want a script to do that ??

Best regards, nErBoS


yes, I have a hub private...... I would have to register the users by hand...... is possible to execute the script?

help me! :(

nErBoS

Ok I will try to do one,

But today I have a exame, I will do it today at night or tomorrow in the morning.

Best regards, nErBoS
--## nErBoS Spot ##--

henry_ok


nErBoS

Hi,

I hope this one helps you..

before putting the script to work create the file generate.txt and put on the script folder.
then put this in that file...
a=1
b=2

then you can use the script..

--Requested by henry_ok 
--Made by nErBoS

Bot = "Auto-Register"

timer = 5 --time to wait to user get connected (in seconds)
assert(dofile("generate.txt"),"File not found.")

function Main()
	frmHub:RegBot(Bot)
end

function NewUserConnected(user, data)
	SetTimer(timer*1000)
	StartTimer()
	AutoReg(user, data)
	StopTimer()
end

function OnTimer()
end

function AutoReg(user, data)
	if not(GetProfileName(user.iProfile) == "VIP" or GetProfileName(user.iProfile) == "Reg") then
		local msg = ""
		local temp = {}
		local save = "generate.txt"
		a = a*2
		b = b*3
		pass = 1000+b-a --If you want change the number 1000 to another to number to do another generator
		msg = msg.."a="..a.."\r\n"
		msg = msg.."b="..b.."\r\n"
		tinsert(temp, msg)
		Writetextfile(save, temp)
		AddRegUser(user.sName, pass, "3")
		user:SendPM(Bot, "You have been register in this hub with this password: "..pass)
		StopTimer()
	end
end

function Writetextfile(file, array)
	writeto(file)
	for x=1,getn(array) do write(array[x].."\r\n") end
	writeto()
end

Best regards, nErBoS
--## nErBoS Spot ##--

henry_ok

thank you very much!

....but my intention was to put a password to the access to hub, fixed from me, and therefore autoregister the user........


there was a script for ptokax icecube, but I have lost it  :-(........

nErBoS

Don't remenber that script !!

Now making a password to the hub is more dificult, you have in the software hub the option to acept only reg users, but in my view you are only making a Hub with Reg Users not Private Hub, because private hubs register their users by hand using a emails acounts.

Best regrads, nErBoS
--## nErBoS Spot ##--

henry_ok

thanks you

 the script that you have created is perfect........:-)

SMF spam blocked by CleanTalk