changing user name in userlist
 

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

changing user name in userlist

Started by _Satan_, 04 September, 2004, 09:33:18

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

_Satan_

is there something that can override the actual nick of a particular user and show it and shows something else in userlist  and in main chat too :D just for teasing

Herodes

Yes u can but as soon as his client sents another $MyINFO then you'll need to cover that up again ..

and possibly pm will not be working probably ... and also downloads may also have some problems ...

ofcourse there is a way to resolve those issues too..
but its gonna take bandwidth for that .. quite an amount of it  ;)

_Satan_

Since hub is on LAN bandwith is not a problem. Also ip is known . can not the nick be modified dynamically every time a message arrives. pms and downlads may use orignal nicks since it is a direct tcp connection between to clients Am i right???

Herodes

yep I understand what u mean ...

I'll be back with a script ... unless some1 else gets it first ... ;)

Herodes

Seems that I've run into problems ...
--- John The Baptist v1 
--- by Herodes 4/9-2004
--- --- --- --- --- 
--- Changes the nicks of users ...
--- not a functional script .. It is not letting cmds for aother scripts to go throught it ...
--- doesnt work as expected in pm ... :(
--- PS: bad day probably ...
--- --- --- --- ---
allowedprof = 0
TelltoOps = nil


tNicks = {
	["Herodes"] = "sedoreH",
	}

function DataArrival(user, data)
	if strsub(data, 1,1) == "<" then 
		if tNicks[user.sName] then
			s,e, msg = strfind(data, "%b<>%s+(.*)")
			SendToAll("<"..tNicks[user.sName].."> "..msg)
			return 1
		end
	elseif strsub(data, 1,4) == "$To:" then
		s,e,toWho,fromWho,msg = strfind(data, "$To:%s(%S+)%sFrom:%s(%S+)%s%$%b<>%s(.*)|")
		if tNicks[fromWho] then
			frmHub:RegBot(tNicks[fromWho])	
			usr = GetItemByName(toWho)
			if usr then
				usr:SendPM(tNicks[fromWho], msg)
			end
			frmHub:UnregBot(tNicks[fromWho])
			return 1
		end
	end
end

that one dont work as intended ... I hope to work out its problems but all in good time ..

_Satan_

#5
function DataArrival(user, data)
   if strsub(data, 1,1) == "<" then
      if tNicks[user.sName] then
         s,e, msg = strfind(data, "%b<>%s+(.*)")
         SendToAll("<"..tNicks[user.sName].."> "..msg)
         return 1
      end
..........................
how could msg be excuted ??
or this script executes last u can see  plops zcrazy bot then it will be simple task to run the above code.

BottledHate

by giving it a table to work with....
(this will NOT change their name in the users list.)
only change the main chat name.

tNicks = {
   ["Nick1"] = "RplaceNick1",
   ["Nick2"] = "ReplaceNick2",
   ["?ottledHat?"] = "GOD",
}

function DataArrival(user, data) 
   if strsub(data, 1,1) == "<" then 
      if tNicks[user.sName] then 
         s,e, msg = strfind(data, "%b<>%s+(.*)") 
         SendToAll("<"..tNicks[user.sName].."> "..msg) 
         return 1 
      end 
   end
end

hope this helps...

-BH
Homepage: www.bottledhate.webhop.org

Compiling  Lua scripts is LAME!!!!!

_Satan_

whats the change still commands  do not work

BottledHate

Homepage: www.bottledhate.webhop.org

Compiling  Lua scripts is LAME!!!!!

_Satan_


BottledHate

#10
what is your command prefix????

ie: !, +, # ....

plug it into the "CommandPrefix"

CommandPrefix = "!"
tNicks = {

   ["Nick1"] = "RplaceNick1",
   ["Nick2"] = "ReplaceNick2",
   ["?ottledHat?"] = "GOD",
}

function DataArrival(user, data) 
   if strsub(data, 1,1) == "<" then 
      if tNicks[user.sName] then 
         s,e, msg = strfind(data, "%b<>%s+(.*)") 
         if strsub(msg,1,1) == CommandPrefix then return end
         SendToAll("<"..tNicks[user.sName].."> "..msg) 
         return 1 
      end 
   end
end

-BH
Homepage: www.bottledhate.webhop.org

Compiling  Lua scripts is LAME!!!!!

BottledHate

my command prefix in my hub is !... !help !banip.. whatever... som in command prefix i put "!" ... and commands worked fine.  the pm side still doesn't work right.. and i'm not sure if it ever will.


--- John The Baptist v1 
--- by Herodes 4/9-2004
--- minor edit by BottledHate... still not working proper (yet)
--- --- --- --- --- 
--- Changes the nicks of users ...
--- not a functional script .. It is not letting cmds for aother scripts to go throught it ...
--- doesnt work as expected in pm ... :(
--- PS: bad day probably ...
--- --- --- --- ---
allowedprof = 0
TelltoOps = nil
CommandPrefix = "!"

tNicks = {
	["?ottledHat?"] = "DEMI-GOD",
	}

function DataArrival(user, data)
	if strsub(data, 1,1) == "<" then 
		if tNicks[user.sName] then
			s,e, msg = strfind(data, "%b<>%s+(.*)")
         if strsub(msg,1,1) == CommandPrefix then return end
			SendToAll("<"..tNicks[user.sName].."> "..msg)
			return 1
		end
	elseif strsub(data, 1,4) == "$To:" then
		s,e,toWho,fromWho,msg = strfind(data, "$To:%s(%S+)%sFrom:%s(%S+)%s%$%b<>%s(.*)|")
		if tNicks[fromWho] then
			usr = GetItemByName(toWho)
			if usr then
            if strfind(msg,1,1) == CommandPrefix then return end
				usr:SendPM(tNicks[fromWho], msg)
			end
			frmHub:UnregBot(tNicks[fromWho])
			return 1
		end
	end
end


-BH
Homepage: www.bottledhate.webhop.org

Compiling  Lua scripts is LAME!!!!!

_Satan_

#12
thanx got this part going renamed the file as zzz.lua i think the the scripts have there priority based on their name . now it works well for jumble fever too..

BottledHate

glad i could be of some help.  :D

-BH
Homepage: www.bottledhate.webhop.org

Compiling  Lua scripts is LAME!!!!!

SMF spam blocked by CleanTalk