mIRC Home    About    Download    Register    News    Help

Print Thread
#148257 02/05/06 06:11 AM
Joined: Nov 2004
Posts: 21
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Nov 2004
Posts: 21
Hi there,

I was making an on ^*:NICK: trigger but encountered some problems and was wondering if someone could possibly help.
I currently have this:

on ^*:NICK:{
haltdef
set %nccom $comchans( $+ $newnick $+ )
echo -t %nccom [Nick Change] $nick => $newnick
}

However, instead of echoing in all the common channels it echos in the first common and just echos the rest, example:
#comchan2 #comchan3 [Nick Change] Test => Test1

Any help will be appreciated.
Thanks in advance.

#148258 02/05/06 06:25 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Code:
On ^*:Nick: {
  var %x = 1
  while (%x <= $comchan($newnick,0)) {
    echo 7 -t $comchan($newnick,%x) $nick is now known as $newnick
    inc %x
  }
  haltdef
}



You missed the the ,0 part to count the common channels. Hope this works out for ya! smile

-Andy

#148259 02/05/06 06:31 AM
Joined: Nov 2004
Posts: 21
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Nov 2004
Posts: 21
Ah, so I did.

Thanks, works perfectly. grin


Link Copied to Clipboard