On nick: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(No difference)
|
Revision as of 14:57, 22 November 2005
The on NICK event triggers when a user changes nickname while on the same channel as you.
on <level>:NICK:<commands>
In this event, $nick holds the old nickname and $newnick the new one.
Example
on *:NICK: { echo -a $nick is now knows as $newnick }
This example would just echo every nickchange to the active window.
If you want to echo it to every common channel (e.g. for changing mIRC's standard layout), you could use the following:
on ^*:NICK: { ; we want to halt mIRC's default output haltdef var %i = 1 ; lets loop through all common channels while (%i <= $comchan($nick,0)) { ; actually echo it to the channel echo -t $comchan($nick,%i) $nick has just changed his nick to $newnick ; increase looping-variable inc %i } }