mIRC Home    About    Download    Register    News    Help

Print Thread
#12503 22/02/03 08:00 PM
Joined: Feb 2003
Posts: 76
G
Babel fish
OP Offline
Babel fish
G
Joined: Feb 2003
Posts: 76
I finally made my script's appearance work, with some problems though:
Code:
 on ^*:QUIT: { 
  if ($nick != $me) { 
    echo $color(quit)  [b]$chan[/b] $timestamp * <- Quits: $nick ( $+ $address $+ ) ( $+ $1- $+ )
    haltdef
  } 
} 
 

$chan won't work, cause there is no quit channel.
$chan($wid) won't work too, as it echoes in another channel! (weird)
$window won't work (same as $chan)

When I enter $chan or $window, the echo appears in the status window. How can i change that and echo to the window from where the user quits?!
Thanks in advance (advantically :P )

#12504 22/02/03 08:36 PM
Joined: Feb 2003
Posts: 27
L
Ameglian cow
Offline
Ameglian cow
L
Joined: Feb 2003
Posts: 27
you need to use $comchan

Edit: likes this

Code:
 on ^*:QUIT: {
  var %i = $comchan($nick,0)
;set %i to the number of channels you and the nick are on together
    while (%i > 0) {
      echo $comchan($nick,%i) Quits: $nick ( $address ) ( $1- )
;echos in each channel you both are on the quit msg
      dec %i
      haltdef
    }
}
 

#12505 22/02/03 09:03 PM
Joined: Feb 2003
Posts: 76
G
Babel fish
OP Offline
Babel fish
G
Joined: Feb 2003
Posts: 76
Thanks man, you saved my life! smile I never looked into mIRC's helpfile for that. Thanks again!!! laugh

#12506 22/02/03 10:36 PM
Joined: Jan 2003
Posts: 237
X
Fjord artisan
Offline
Fjord artisan
X
Joined: Jan 2003
Posts: 237
on ^*:QUIT: {
if ($nick != $me) {
echo -t $chan 7:2[ $+ $asctime(hh:nn:ss) $+ ]3 Quits: $nick ( $+ $address $+ ) ( $+ $1- $+ )
haltdef
}
}

why dosnt taht work? I want it to echo in the channel the person was in



;Check for Life

if (%life == $null) {
goto getlife
}
#12507 22/02/03 10:53 PM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
It doesn't work because when someone quits IRC they disconnect from the server, not just the channel. on QUIT doesn't happen in a channel like on TEXT or on ACTION do, so $chan == $null, it says that in the first post of this thread ffs!

#12508 22/02/03 11:03 PM
Joined: Jan 2003
Posts: 237
X
Fjord artisan
Offline
Fjord artisan
X
Joined: Jan 2003
Posts: 237
so how can i make it so it echos in the chanel they left from?



;Check for Life

if (%life == $null) {
goto getlife
}
#12509 23/02/03 12:00 AM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
Have you even read this thread? The answer has already been given, use $comchan!

#12510 23/02/03 05:17 AM
Joined: Jan 2003
Posts: 237
X
Fjord artisan
Offline
Fjord artisan
X
Joined: Jan 2003
Posts: 237
oops lol ty



;Check for Life

if (%life == $null) {
goto getlife
}
#12511 23/02/03 12:44 PM
Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
One final thought too - you do NOT need the if ($nick == $me). You can simply use the ! switch. Taking your code and changing it around it would be:


on !^*:QUIT: {
echo $color(quit) $chan $timestamp * <- Quits: $nick ( $+ $address $+ ) ( $+ $1- $+ )
haltdef
}

you could even do this:

on !^*:QUIT: {
echo $color(quit) $chan $timestamp * <- Quits: $nick ( $+ $address $+ ) ( $+ $1- $+ ) | haltdef
}

Keep in mind what other people said about $comchan, but this is a way to shrink your code and it still does the same thing. The ! switch is the exact same as saying if ($nick != $me)


Those who fail history are doomed to repeat it

Link Copied to Clipboard