mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2008
Posts: 167
S
Vogon poet
OP Offline
Vogon poet
S
Joined: Oct 2008
Posts: 167
Hi, I am wondering how to make the "on:QUIT:" trigger go through as a channel.

For example:
Quote:
* Yada Yada quit.
<bot> Bye Yada :'(


I haven't been able to find the answer anywhere. frown

Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
on NICK and on QUIT events are not related to channels. To figure out what channel(s) a user was on when they quit or change their nick you need to use $comchan. Note the pluralization of "channels" as there may be more than one channel.

Code:
on *:QUIT: {
  var %i = 1
  while ($comchan($nick, %i)) { 
    var %chan = $v1
    echo -a one of the channels is %chan
    inc %i
  }
}


You can use each value of %chan in the above loop to do something with a channel both you and the user were on when they quit.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"

Link Copied to Clipboard