mIRC Home    About    Download    Register    News    Help

Print Thread
#6073 11/01/03 02:08 PM
Joined: Jan 2003
Posts: 23
P
Pomax Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Jan 2003
Posts: 23
Would it be possible to add a functionality to the QUIT event that will record all channels the $nickname was seen quitting on, so that it makes it easier to determine wether scripts for certain channels on quits should trigger?

I'm thinking something like either a new variable name ($quitchans for instance) or filling the already existing $chan with a (space) seperated list of channels that the QUIT was observed in. This can then be used for [isin] checks or for tokenising and then iterative use.

an example usage (in this case a simple channel level modifier) would be:

on *:quit: {
  if (#foobar isin $quitchans) {
    dec %foobarlevel
    mode #foobar +l %foobarlevel
  }
}

#6074 11/01/03 02:20 PM
Joined: Dec 2002
Posts: 395
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Dec 2002
Posts: 395
Well, $chan is not assigned to on QUIT, becouse you only get ONE quit message, no matter on how many channels nick is on.
All you can do is to use while() loop to cycle trough $comchan($nick,N).
So.. you can create this identifier yourself smile

#6075 11/01/03 03:19 PM
Joined: Jan 2003
Posts: 23
P
Pomax Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Jan 2003
Posts: 23
That's... not what I meant =)

once the user has quit, there's no way to check what channels it quit in unless you maintain a userlist for all the channels your in and check that, or scan each channel for the quit line.

My suggestion was a new variable (or using $chan for it's purpose, but that's be less desirable) that carries all channelnames (including #, seperated by some seperator, with space being the most obvious one) of the channels the quit occured in, for improved functionality of the QUIT event in channel administrative mirc scripts.

#6076 11/01/03 04:11 PM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
What Monosex said is correct, you can simply loop through $comchan in the on QUIT event to check which channels you were both on together. A $chans identifier would really only be truly useful if /echo could handle comma delimited targets.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
#6077 15/01/03 08:49 AM
Joined: Dec 2002
Posts: 10
M
Pikka bird
Offline
Pikka bird
M
Joined: Dec 2002
Posts: 10
'if ($nick ison #chan) ...' works fine


Link Copied to Clipboard