mIRC Home    About    Download    Register    News    Help

Print Thread
Replacing standard IRC responses #41151 11/08/03 06:42 PM
Joined: Dec 2002
Posts: 31
N
Nekomusume Offline OP
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Dec 2002
Posts: 31
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...

Re: Replacing standard IRC responses #41152 11/08/03 06:49 PM
Joined: Dec 2002
Posts: 2,985
Watchdog Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
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.

Re: Replacing standard IRC responses #41153 11/08/03 07:03 PM
Joined: Dec 2002
Posts: 31
N
Nekomusume Offline OP
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Dec 2002
Posts: 31
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.

Re: Replacing standard IRC responses #41154 11/08/03 08:33 PM
Joined: Dec 2002
Posts: 2,985
Watchdog Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
I dn't mind scripting when I am tired because then I have something to blame stuff-ups on. laugh

Re: Replacing standard IRC responses #41155 12/08/03 09:43 AM
Joined: Dec 2002
Posts: 117
R
Rich Offline
Vogon poet
Offline
Vogon poet
R
Joined: Dec 2002
Posts: 117
You sure you've got a different version in your remotes? Because this one had a typo as well...
dec %quitchannels)


$input(Me like stars, You too?)
Re: Replacing standard IRC responses #41156 12/08/03 06:54 PM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
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
}