mIRC Homepage
Posted By: DuXxXieJ Quiting. - 10/03/07 08:28 PM
Code:
ON ^1:QUIT: {
  echo $chan 10.:11 $+ $time $+ 10:. 2*14 $nick has quited with the reason: ( $+ $1- $+ )
  haltdef
}


It's echo'ing in my status, but it needs to echo in the chan where i normaly see:

* $nick has quited IRC: ($reason)

....
Posted By: Kardafol Re: Quiting. - 10/03/07 08:45 PM
You need to loop through all the channels you and $nick have in common, since $chan is null in on QUIT events.
Posted By: DuXxXieJ Re: Quiting. - 10/03/07 09:01 PM
*Doesn't get that*
Posted By: Kardafol Re: Quiting. - 10/03/07 09:41 PM
On QUIT isn't a channel based event. When someone quits, they 'part' all channels. So you have to use:
Code:
on ^*:quit: {
var %x = $comchan($nick,0), %y = 0
while (%y < %x) {
inc %y
echo $comchan($nick,%y) * $nick has quit.
}
haltdef
}

Untested, but thats the basic idea.
Posted By: LonDart Re: Quiting. - 10/03/07 09:44 PM
Would echo $target work? since she wants the echo in the window where the it would normally appear.
Posted By: Kardafol Re: Quiting. - 10/03/07 10:59 PM
No.
There is NO target in a on quit event. All you're given is $nick, $1-, $server, $serverip, and $cid (and other identifiers excluding $target, $chan).
Posted By: learn3r Re: Quiting. - 11/03/07 01:39 AM
Click here

Here is what you're looking for
Posted By: Sintel Re: Quiting. - 11/03/07 01:03 PM
Code:
ON ^*:QUIT:{
  var %x = $comchan($nick,0)
  while (%x > 0) {
    echo $comchan($nick,%x) 10.:11 $+ $time $+ 10:. 2*14 $nick has quit ( $+ $1- $+ )
    dec %x
  }
  haltdef
}


Basically what Kardafol said, but formatted, corrected the error (quited isn't an english word :)) and one less variable.
Posted By: learn3r Re: Quiting. - 11/03/07 08:02 PM
Quote:
(quited isn't an english word :))

yes, because it's quitted
Posted By: Riamus2 Re: Quiting. - 12/03/07 03:13 AM
"quitted" isn't correct either. laugh
Posted By: hixxy Re: Quiting. - 12/03/07 12:08 PM
It's just quit.

The past and future tense is the same.

I quit my job. (past)
I will quit my job. (future)
Posted By: Sintel Re: Quiting. - 12/03/07 01:25 PM
Quitted is apparently correct as well if you speak Commonwealth English smile But there aren't a lot of people that use it :p
© mIRC Discussion Forums