mIRC Home    About    Download    Register    News    Help

Print Thread
filtering out "quits" #162901 23/10/06 06:57 PM
Joined: Jan 2004
Posts: 46
F
filedumphere Offline OP
Ameglian cow
OP Offline
Ameglian cow
F
Joined: Jan 2004
Posts: 46
This one's a bit tricky, but I do need to do this, and I cannot find any help specific to it from searching.

I need to filter out (halt) somebody's very long quit msg. I could just turn that feature off in Mirc, but I will need to see the joins all the time. My question is, does anyone know how to do this? I only need to do it from one specific person, and I could try a script to catch it at the snotice level. Not all quits, just one particular one, based on what's in it. With quit, "on text/action" won't work, because it's already happened and it's too late to halt it. That's where the problem is.

Anyone's help would be greatly appreciated. Thanks.

Re: filtering out "quits" #162902 23/10/06 07:07 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
/help on quit
/help /haltdef

Those should give you the information you'll need to prevent the quit message from showing up.


Invision Support
#Invision on irc.irchighway.net
Re: filtering out "quits" #162903 24/10/06 03:05 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
on ^*:QUIT:{
var %quit $1-

there you get a variable called "quit", then you can use $len(%quit), and if %quit is longer then lets say 5 haltdef = dosent show, else show.
Code:
on ^*:QUIT:{
  var %quit $1-
 var %length $len(%quit)
if (%length => 5) { haltdef }
else {
}
}

untested so dosent know if it work wink but try it and edit it, shouldent be that hard to get it to work as u want..


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: filtering out "quits" #162904 24/10/06 04:37 AM
Joined: Sep 2006
Posts: 12
R
routed Offline
Pikka bird
Offline
Pikka bird
R
Joined: Sep 2006
Posts: 12
Code:
on ^*:QUIT: {
  if ($len($1-) > 50) { 
    var %a = 1
    while ($comchan($nick,%a)) {
      echo $colour(quit) -i2 $v1 *** $nick has quit IRC (quit message too long)
      inc %a
    }
  haltdef
  }
}


You can change the 50 to whatever you deem appropriate, or change it to if ($nick = certain person) instead

change the echo to whatever you wish, that echo is mIRC's default... with the quit message changed...

-Rappy (routed)

Re: filtering out "quits" #162905 24/10/06 08:26 AM
Joined: Jan 2004
Posts: 46
F
filedumphere Offline OP
Ameglian cow
OP Offline
Ameglian cow
F
Joined: Jan 2004
Posts: 46
Alright guys. Thanks for your responses. I was looking at completely halting a particular quit message (that is repetitve, hence the need for filtering), not necessarily by anyone's length. This worked for me:
Code:
 on ^*:quit: {
  if (XXXXXXX isin $1-) {     
    /haltdef
  }
} 


Simple enough. It was the "^" that I forgot about, even though I use that for hundreds of other text scripts...never thought that could apply to a quit message. Halt works as well as haltdef. Thanks again.