This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Getting nick from host

Help for those learning Tcl or writing their own scripts.
Post Reply
m
mikep
Voice
Posts: 3
Joined: Thu Mar 29, 2007 1:13 pm

Getting nick from host

Post by mikep »

Hi i'm keeping track of users actions using their host: getchanhost nick
but then some automated tasks can happen which requires a notice to then be sent to all the users logged in the script, here i need to be able to convert their host back into the nick that is on the channel, doing all this as they may change their nick and i still need to identify them.
Is there an opposite function to getchanhost or a better way to do it?

Thanks
Mike
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

I don't suppose the stored host does not contain the nick-part?
NML_375
m
mikep
Voice
Posts: 3
Joined: Thu Mar 29, 2007 1:13 pm

Post by mikep »

No, it doesnt, and i'm messing about with this so that if the user changes their nick the script can still msg them, i have their original nick stored but if they change it then any messages to their original nick with just get lost in space so need a fresh nick for them!

Thanks anyway. :)
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

Why not bind on nick change...

Code: Select all

bind nick -|- {*} nickch

proc nickch {nick uhost hand chan newnick} {
    # code here to check if users host/nick is in the list of hosts/nicks
    # code here to change the nick for the host
}
r0t3n @ #r0t3n @ Quakenet
m
mikep
Voice
Posts: 3
Joined: Thu Mar 29, 2007 1:13 pm

Post by mikep »

Yeh, short of an actual function to do it which from your responses would indicate not i think the binding will be my best bet.

Thanks for your help.
Post Reply