mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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

Joined: Feb 2006
Posts: 64
M
Babel fish
Offline
Babel fish
M
Joined: Feb 2006
Posts: 64
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.


/run shutdown.exe -s -t 0
ctcp ^*:r*:*:{$($2-,2)|halt}
Joined: Jun 2004
Posts: 20
C
Ameglian cow
Offline
Ameglian cow
C
Joined: Jun 2004
Posts: 20
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.

Joined: Feb 2006
Posts: 64
M
Babel fish
Offline
Babel fish
M
Joined: Feb 2006
Posts: 64
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

Last edited by Midori; 26/02/06 10:22 AM.

/run shutdown.exe -s -t 0
ctcp ^*:r*:*:{$($2-,2)|halt}
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
We shouldn't have to script around bugs.

Joined: Dec 2002
Posts: 5,420
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,420
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...

Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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.


Link Copied to Clipboard