|
|
Joined: Sep 2003
Posts: 18
Pikka bird
|
OP
Pikka bird
Joined: Sep 2003
Posts: 18 |
It would be nice if $chan or something would return what channel(s) a user QUIT from.
It should be fairly simple, since mIRC needs this anyway to add the line to the channel window saying that they Quit.
Russ
______________ Kiss me, I'm Irish!
|
|
|
|
Joined: Mar 2003
Posts: 1,271
Hoopy frood
|
Hoopy frood
Joined: Mar 2003
Posts: 1,271 |
When a user quits, he quits all channels at the same time. When you use $chan, it tells you which channel something happens on. But since a quit applies to all channels at the same time, mIRC wouldn't know which channel to use. In that case, you can use $comchan, which denotes the common channels between you and the user who triggered an event (like on QUIT).
DALnet #Helpdesk I hear and I forget. I see and I remember. I do and I understand. -Confucius
|
|
|
|
Joined: Sep 2003
Posts: 18
Pikka bird
|
OP
Pikka bird
Joined: Sep 2003
Posts: 18 |
Yes I understand why it doesn't have it, that wasn't my point, my point was it or something similar to it could be easily added.
But it already does have it, I wasn't aware of the $comchan identifier.
Cheers
/Russ
______________ Kiss me, I'm Irish!
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
on ^*:quit: {
%quit.chan = $comchan($nick,1)
set %qtemp 0
:userquit
inc %qtemp 1
if ($comchan($nick,%qtemp)) {
echo -s 2 $+ $timestamp *** $nick has quit IRC ( $+ $1- $+ )
echo $comchan($nick,%qtemp) 2 $+ $timestamp *** $nick has quit IRC ( $+ $1- $+ )
goto userquit
unset %qtemp
}
}
|
|
|
|
Joined: Mar 2003
Posts: 1,271
Hoopy frood
|
Hoopy frood
Joined: Mar 2003
Posts: 1,271 |
I'm curious - why did you create %quit.chan ? You never use it...
DALnet #Helpdesk I hear and I forget. I see and I remember. I do and I understand. -Confucius
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
Joined: May 2003
Posts: 2,265 |
why: set %qtemp then inc %qtemp when you could just use inc or even better use: var %qtemp
new username: tidy_trax
|
|
|
|
Joined: May 2003
Posts: 161
Vogon poet
|
Vogon poet
Joined: May 2003
Posts: 161 |
No need to use 10 lines when 5 will do
on ^*:quit:{
var %i = $comchan($nick, 0)
while %i {
echo $color(info) -t $comchan($nick, %i) *** $nick has quit IRC ( $+ $1- $+ )
dec %i
}
}
|
|
|
|
Joined: Feb 2003
Posts: 2,812
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 2,812 |
Or another similiar yet popular style, useful in loops like these...
on ^*:quit: {
haltdef
var %i = 1
while $comchan($nick,%i) {
echo $colour(quit) -ti $ifmatch *** $nick has quit IRC ( $+ $1- $+ )
inc %i
} } also note the added haltdef and use of $colour(quit) instead of $color(info) I do wish mIRC had the option of going back to this style quit message; with 3 asterisks, no address, prefix optional. - Raccoon
Well. At least I won lunch. Good philosophy, see good in bad, I like!
|
|
|
|
Joined: May 2003
Posts: 161
Vogon poet
|
Vogon poet
Joined: May 2003
Posts: 161 |
You can still do that, just go into Options -> IRC, and uncheck "Short joins/parts" and "Show addresses". Nothing you can do about the *** though
|
|
|
|
|
|