mIRC Homepage
Posted By: RusselB Evaluation of $me in nick changes - 25/02/06 09:38 AM
I happened to have a script that changes the titlebar when I change my nick. Worked fine up to 6.17
It appears, thanks to some work by Genius_at_work, that when a person changes their nick, the $me identifier gets changed before there's any checking to see if there's a code that uses it.

My original post, and the responses, are here
Posted By: Midori Re: Evaluation of $me in nick changes - 26/02/06 08:11 AM
I see no reason not to bother looking in those other posts... just look at
on *:nick: you'll notice that it uses $newnick and not $me, this will of course apply to yourself as well, hope that helps.
Posted By: Cork Re: Evaluation of $me in nick changes - 26/02/06 09:16 AM
Midori.. If youv botherd to check the link you would have seen that its not about $me not being the new nick it's that it is the new nick and not the old as it sould be.
Posted By: Midori Re: Evaluation of $me in nick changes - 26/02/06 10:12 AM
k, looked at those posts this time.. sorry about that..

use $nick instead of $me to show what old nick that is (and compare it to say, a variable that had your last nick) and then set it to the titlebar

on :nick:{
if ($newnick != $me) halt
if ($nick == %pastnick) set %pastnick $newnick
.titlebar %pastnick
}

or somesuch
Posted By: hixxy Re: Evaluation of $me in nick changes - 26/02/06 02:58 PM
We shouldn't have to script around bugs.
Posted By: Khaled Re: Evaluation of $me in nick changes - 27/02/06 01:05 PM
This is due to fixing a bug relating to the order in which nick and notify events are sent by watch versus non-watch servers. The fix affects the value of $me in notify events as well when on non-watch servers so that they match the behaviour on watch servers.

I think I can change it so that $me works the same as before in the nick event, however I won't be able to do that for the notify events since I can't change the order in which messages arrive from the server and I would rather have consistency in the scripting behaviour rather than have mIRC behave differently on different networks (when possible). Of course it may be that different networks send nick and notify events in different orders, in which case it's arbitrary...
Posted By: RusselB Re: Evaluation of $me in nick changes - 27/02/06 08:28 PM
Thanks Khaled.

Everyone please note that there is an easily scirptable work-around for the specific problem that I encourntered, which is posted in the related topic in the Scripts & Pop-ups forum.
© mIRC Discussion Forums