mIRC Home    About    Download    Register    News    Help

Print Thread
How can you make on:QUIT channel specific? #211885 04/05/09 12:19 AM
Joined: Oct 2008
Posts: 167
S
seanturner70 Offline OP
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

Re: How can you make on:QUIT channel specific? [Re: seanturner70] #211886 04/05/09 12:22 AM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
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"