mIRC Home    About    Download    Register    News    Help

Print Thread
#97651 15/09/04 12:11 AM
Joined: Jul 2004
Posts: 59
S
synth7 Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Jul 2004
Posts: 59
For some reason this won't work...it shows nothing to me, although the nick does change, I see nothing....

Code:
on ^*:NICK: {
  echo $chan 03 $+ $timestamp ¤¤¤ $nick is now known as $newnick
  haltdef
}



Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
In a on NICK event, there is no channel (it is a network thing), so $chan is invalid (= $null). Also, control codes (color, bolds, underlines) cannot go along with identifiers, so you should have $newnick $+  instead of $newnick.

You can use the -a switch to echo the line in the current active window.

Zyzzyx smile


"All we are saying is give peace a chance" -- John Lennon
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
on NICK events don't happen in channels, so there is no $chan. Loop through $comchan instead.
Code:
on ^*:NICK:{
  var %i = 1
  while ( $comchan($newnick,%i) ) {
    echo -tc nick $v1 ¤¤¤ $nick is now known as $newnick
    inc %i
  }
  haltdef
}

The "-t" puts the timestamp in only if enabled in the window being echoed to. The "-c nick" makes it echo in the colour for nick changes in the Alt+K colour dialog.

The /echo -c switch was added in mIRC v6.11. Use /echo $color(nick) if you have a version older than that.
The $v1 identifier was added in mIRC v6.16. Change it to $ifmatch if you have a version older than that.

Zyzzyx26:
Quote:
You can use the -a switch to echo the line in the current active window.

Bad idea IMO. The active window may not even be on the same network as the nick change.


Link Copied to Clipboard