mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2002
Posts: 31
N
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...

Joined: Dec 2002
Posts: 2,985
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.

Joined: Dec 2002
Posts: 31
N
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.

Joined: Dec 2002
Posts: 2,985
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

Joined: Dec 2002
Posts: 117
R
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?)
Joined: Dec 2002
Posts: 3,547
S
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
}


Link Copied to Clipboard