Change Registered Nick
 

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

Change Registered Nick

Started by 6Marilyn6Manson6, 05 December, 2004, 07:37:06

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

6Marilyn6Manson6

Hello, I have idea for script.

I search script for change registered nick, example

in xxx hub my Registered nick is   6Marilyn6Manson6   and I want change it with this nick   [ITA]6Marilyn6Manson6   and I with command:

!chgmynick 6Marilyn6Manson6 - [ITA]6Marilyn6Manson6

I.. change my personal nick in [ITA]6Marilyn6Manson6 .
It is possible? Thanks a lot


nErBoS

Hi,

Here you go...

--## CHANGE REGGED NICKS BOT
--## Requested by 6Marilyn6Manson6
--## Made by nErBoS
--## Commands:
--##	+changemynick 	-- Changes your regged nick to a new one

sBot = "CRN-Bot"

fPtokaxPath = "C:\\WorkFolder\\Ptokax\\" -- Put here your Ptokax Folder path

function Main()
	frmHub:RegBot(sBot)
end

function DataArrival(user, data)
	if (user.iProfile ~= -1 and (strsub(data,1,1) == "<" or strsub(data,1,5+strlen(sBot)) == "$To: "..sBot)) then
		data = strsub(data,1,strlen(data)-1)
		local s,e,cmd = strfind(data, "%b<>%s+(%S+)")
		if (cmd == "+changemynick") then
			execute("copy "..fPtokaxPath.."RegisteredUsers.dat")
			local s,e,sNick = strfind(data, "%b<>%s+%S+%s+(%S+)")
			if (sNick == nil) then
				user:SendPM(sBot, "Syntax Error, +changemynick , you must write a nick.")
			elseif (strfind(sNick, "[%c|\n\r]")) then
				user:SendPM(sBot, "Your nick is invalid. Please choose a new one.")
			elseif (CheckNick(sNick) == nil) then
				user:SendPM(sBot, "The nick "..sNick.." is already registered.")
			else
				local sPass = CheckPass(user.sName)
				if (sPass == nil) then
					user:SendPM(sBot, "Your old pass wasn't found.")
				else
					AddRegUser(sNick,sPass,user.iProfile)
					DelRegUser(user.sName)
					user:SendPM(sBot, "The nick "..user.sName.." has been unregged and the new nick "..sNick.." has been regged with your pass and profile.")
					user:SendPM(sBot, "Please reconnect with you new nick.")
				end
			end
			remove("RegisteredUsers.dat")
			return 1
		end
	end
end

function CheckNick(sNick)
	readfrom("RegisteredUsers.dat")
	while 1 do
		local sLine = read()
		if (sLine == nil) then
			readfrom()
			return 1
		else
			local s,e,sOldNick = strfind(sLine, "(.+)|.+|%d+")
			if (sOldNick ~= nil and strlower(sNick) == strlower(sOldNick)) then
				readfrom()
				return nil
			end
		end
	end
end

function CheckPass(sNick)
	readfrom("RegisteredUsers.dat")
	while 1 do
		local sLine = read()
		if (sLine == nil) then
			readfrom()
			return nil
		else
			local s,e,sOldNick,sOldPass = strfind(sLine, "(.+)|(.+)|%d+")
			if (sOldNick ~= nil and sOldPass ~= nil and strlower(sNick) == strlower(sOldNick)) then
				readfrom()
				return sOldPass
			end
		end
	end
end

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

6Marilyn6Manson6

I nErBoS.. thanks a lot for script, but I have problem. In my hub tester my registerd nick is:   ReVeReNDo and I'm master but... I want change my nick in   6Marilyn6Manson6, I write:

+changemynick 6Marilyn6Manson6

but .. my nick not change and receive:   [22:37] Your old pass wasn't found.

Why? thanks

bastya_elvtars

QuoteOriginally posted by 6Marilyn6Manson6
I nErBoS.. thanks a lot for script, but I have problem. In my hub tester my registerd nick is:   ReVeReNDo and I'm master but... I want change my nick in   6Marilyn6Manson6, I write:

+changemynick 6Marilyn6Manson6

but .. my nick not change and receive:   [22:37] Your old pass wasn't found.

Why? thanks

fPtokaxPath = "C:\\WorkFolder\\Ptokax\\" -- Put here your Ptokax Folder path

Didn't you forget that backlashes have to be double?

C:\\Program Files\\PtokaX
Everything could have been anything else and it would have just as much meaning.

6Marilyn6Manson6

No No, I insert complete path:

fPtokaxPath = "C:\Documents and Settings\server\Documenti\DC++\-= MY HUB =-\planetarium.no-ip.org" -- Put here your Ptokax Folder path

but.. not found :(

Herodes

QuoteOriginally posted by 6Marilyn6Manson6
fPtokaxPath = "C:\Documents and Settings\server\Documenti\DC++\-= MY HUB =-\planetarium.no-ip.org" -- Put here your Ptokax Folder path

try it like this ..

fPtokaxPath = "C:\\Documents and Settings\\server\\Documenti\\DC++\\-= MY HUB =-\\planetarium.no-ip.org" -- Put here your Ptokax Folder path

or like this ...

fPtokaxPath = "C:/Documents and Settings/server/Documenti/DC++/-= MY HUB =-/planetarium.no-ip.org" -- Put here your Ptokax Folder path

6Marilyn6Manson6

Hi Herodes,

fPtokaxPath = "C:\\Documents and Settings\\server\\Documenti\\DC++\\-= MY HUB =-\\planetarium.no-ip.org" -- Put here your Ptokax Folder path

not found.. and

fPtokaxPath = "C:/Documents and Settings/server/Documenti/DC++/-= MY HUB =-/planetarium.no-ip.org" -- Put here your Ptokax Folder path

not found :C

ufffffffffff ^__^

nErBoS

Hi,

Try this out...

"C:\\Documents and Settings\\server\\Documenti\\DC++\\-= MY HUB =-\\planetarium.no-ip.org\\"

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

SMF spam blocked by CleanTalk