Top

regex kick


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  5.0 (of 2 scores)
Date Added  Jun 03, 2005
Last Updated  Sep 04, 2008

Introduction

This could be used with a ban, just a tiny bit of editing.
Usage !kick <-regex|nickname> reason
You don't need a reason. If you specify regex then you must add some regular expressions. Some examples are commenting in the source code.
It will kick anything **matching** the regex. Tutorial for regex @ regular-expressions.info

UPDATE: made it -regex instead of regex incase you wanted to match the nick regex!

Grab the Code

;kick something with 3 numbers at the end
;<Redddd> !kick -regex \d{3}
;* abcde313 was kicked by My (Kick requested from Redddd matching \d{3}. No reason specified.)
 
;kick anything named fish with anything after it
;<Redddd> !kick -regex fish*
;* fishbot was kicked by My (Kick requested from Redddd matching fish*. No reason specified.)
 
;kick anything ending in t
;<Redddd> !kick -regex t$
;* ooooot was kicked by My (Kick requested from Redddd matching t$. No reason specified.)
;* fishbot was kicked by My (Kick requested from Redddd matching t$. No reason specified.)
 
on 9999:TEXT:!kick *:#:{
  if (-regex isin $2) {
    ;it is a regex kick
    var %x = $nick($chan,0)
    while (%x) {
      if ($regex($nick($chan,%x),$3)) {
        ;matched someone with regex.
        .kick $chan $nick($chan,%x) $iif(!$4,Kick requested from $nick matching $3 $+ . No reason specified.,$4-)
      }
      dec %x
      ;remove the comment on the line below to debug the script!
      ;echo -a I decreased by 1 and im now on $nick($chan,%x)
    }
  }
  elseif (($3-) && (-regex !isin $2)) {
    .kick $chan $2 $3
    ;isn't a regex kick, just kick someone normally
  }
  else {
    .kick $chan $2 Kick requested from $nick $+ . No reason specified.
    ;no reason, normal kick
  }
}
 

Comments

  (4)  RSS
DarthReven
Comments: 468
 
mIRC Snippet:  regex kick
Posted on Jun 3, 2005 4:50 pm
its a nice code that uses regex is a not to nice way
Jukadi
Comments: 9
 
mIRC Snippet:  regex kick
Posted on Aug 3, 2008 9:20 pm
interesting :)
F*U*R*B*Y*
Comments: 637
 
mIRC Snippet:  regex kick
Posted on Aug 3, 2008 9:59 pm
wow, thats a good way to bump a 4 year old topic
Eugenio
Comments: 1,193
 
mIRC Snippet:  regex kick
Posted on Aug 3, 2008 10:07 pm
rofl chaz was last seen in 06
bloody hell

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom