mIRC Homepage
Posted By: Nekomusume Replacing standard IRC responses - 11/08/03 06:42 PM
i've been replacing many of the standard responses given when people /nick, /part, etc. and i've finally worked my way down to /quit... which is proving to be a major headache.

this is what i have at the moment:

on ^*:QUIT: {
set -u0 %quitchannels $comchan($nick,0)
while (%quitchannels > 0 ) {
echo 14 $comchan($nick,%quitchannels) -- 15* 14Quit - 15 $nick 14-15 $asctime(h:nntt)
dec %quitchannels)
}
haltdef
}


it ends up just endless-looping. i'm guessing that it might be that $comchan() won't work on somebody who just quit - but i got the idea to use it from an MIRC scripting site (can't recall which one) and can't think of any other way to get the same result...
Posted By: Watchdog Re: Replacing standard IRC responses - 11/08/03 06:49 PM
Code:
ON ^*:QUIT: {
  var %sc.q = 1
  while ($comchan($nick,%sc.q)) {
    echo $colour(quit) -ti2 $ifmatch [color:brown]$nick has left IRC -- $calc($nick($ifmatch,0)-1) users -- $1-[/color]
    inc %sc.q
  }
  haltdef
}
I just pasted this snippet from my script. It's a slightly modified one from a script Hammer posted once. Just modify any of the brown bit to suit how you want the event to look like.
Posted By: Nekomusume Re: Replacing standard IRC responses - 11/08/03 07:03 PM
actually, it was noticed that the version i have in my remotes isn't the same one i posted here. the one in the remotes had a typo...

i HATE scripting when i'm tired.
Posted By: Watchdog Re: Replacing standard IRC responses - 11/08/03 08:33 PM
I dn't mind scripting when I am tired because then I have something to blame stuff-ups on. laugh
Posted By: Rich Re: Replacing standard IRC responses - 12/08/03 09:43 AM
You sure you've got a different version in your remotes? Because this one had a typo as well...
dec %quitchannels)
Posted By: SladeKraven Re: Replacing standard IRC responses - 12/08/03 06:54 PM
on ^*:quit: {
%quitchannels = $comchan($nick,1)
set %temp 0
:userquit
inc %temp 1
if ($comchan($nick,%temp)) {
echo 14 $comchan($nick,%quitchannels) -- 15* 14Quit - 15 $nick 14-15 $asctime(h:nntt)
goto userquit
}
echo 14 -st -- 15* 14Quit - 15 $nick $nick ( $+ $address $+ ) has quit IRC ( $+ $1- $+ ) 14-15 $asctime(h:nntt)
unset %temp
haltdef
}
© mIRC Discussion Forums