mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2012
Posts: 9
J
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
J
Joined: Feb 2012
Posts: 9
Hi!

I'm on a server that keeps sending server notices to me, and I want to block those. Network has to send them, socan't be shut off..I just want a small script or piece of code that blocks server notices. Maybe something that doesn't block ALL, but just those sending specific words I can set.

Joined: Mar 2010
Posts: 146
Vogon poet
Offline
Vogon poet
Joined: Mar 2010
Posts: 146
Code:
on ^*:SNotice:*:{
  if (*This* iswm $1-) { haltdef }
  elseif (*Something* iswm $1-) { haltdef }
  elseif (*Something else* iswm $1-) { haltdef }
}


Replace your filter words with the words that i placed inside *
Have a look at:
Code:
/help iswm

and also:
Code:
/help isin


Nothing...
Joined: Jul 2006
Posts: 4,150
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,150
You can use the on snotice event to catch server notice (/help on notice) and you can use the ^ prefix with the /haltdef command to prevent the text from being printed in the channel window (I used /halt cause once a match is found, there's no need to keep looking)
Code:
alias -l tohalt return the list of word goes here
on ^*:snotice:*:{
if ($network == the_network) {
   var %a 1,%t $strip($1-),%l $tohalt
   while ($gettok(%l,%a,32)) {
     if ($istok(%t,$v1,32)) halt
     inc %a
  }
 }
}
Edit the network's name and the list of word in the alias 'tohalt'


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Jun 2009
Posts: 96
V
Babel fish
Offline
Babel fish
V
Joined: Jun 2009
Posts: 96
don't know how are IRCd's now
but I know in past there was always a flag (usermode) to disable snotices

much easier :P


Link Copied to Clipboard