mIRC Home    About    Download    Register    News    Help

Print Thread
#8560 27/01/03 07:59 PM
Joined: Jan 2003
Posts: 27
S
Spoof Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Jan 2003
Posts: 27
The problem is the next:
The code work fine bit it dosen't echo in a channal.It echo in status windows.Why thats happen?
on ^*:NICK:{
echo $chan 4 $newnick was previously known as $nick
haltdef
halt
}


Tullamore Dew
#8561 27/01/03 08:27 PM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
Please delete your other post, you don't need 2 about the same thing...EDIT: nm, you can't now someone replied...

$chan is returning null because nickchanges aren't a channel event.To echo it in all channels you are in with $newnick use $comchan in a loop.

Also you don't need halt and haltdef. Since it is at the end of your event, you can use either.

Finally I don't know what the 4 was there for, so I left where it was. Swop it with $ifmatch to make the text red, which I'm guessing is what you wanted to do.

Code:
on ^*:NICK:{
  var %c = 1
  while ( $comchan($newnick,%c) != $null ) {
    echo $ifmatch 4 $newnick was previously known as $nick
    inc %c
  }
  haltdef
}

#8562 27/01/03 09:49 PM
Joined: Jan 2003
Posts: 27
S
Spoof Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Jan 2003
Posts: 27
Sorry for the double posts.And 10x fot the code.I dont know how to delete da previoce


Tullamore Dew

Link Copied to Clipboard