tglogo.png

1 LIKES

Snippet


ircWX Ghost Kicker

In Category Buzzen Posted by err0r On 12/22/17

Used to kick ghost nicks on ircwx
#ghostnick on
alias ghostnick {
  ;To use: ghostnick %#Channel Nickname
  ;e.g.: on *:JOIN:#: ghostnick $chan $nick
  unset %ghostfound
  if (!$2) halt
  if (!$regex($2,[0-9]+\Z)) halt
  ;$1 room
  ;$2 nickjustjoined
  var %rm $chr(37) $+ $chr(35) $+ $1
  var %nk1 $regsubex($2,[0-9]+\Z,) $+ *
  var %ip $address($2,1)
  var %i 1
  while ($nick(%rm,%i)) {
    if ($nick(%rm,%i) = $2) inc %i
    else {
      if (%nk1 iswm $nick(%rm,%i)) { 
        if ($address($nick(%rm,%i),1) == %ip)  {
          inc -eu60 %ghost. [ $+ [ %rm ] $+ [ . ] $+ [ $address($nick(%rm,%i),1) ] ]
          if (%ghost. [ $+ [ %rm ] $+ [ . ] $+ [ $address($nick(%rm,%i),1) ] ] >= 3) {
            access %rm ADD DENY $gaddy($nick(%rm,%i) 15 : Ghost Flooding
            kick %rm $nick(%rm,%i) : Ghost flooding
          }
          else {
            set %ghostfound true
            kick %rm $nick(%rm,%i) Ghosting
          }
        }
      }
      inc %i
    }
  }
  if (%ghostfound) { 
    kick %rm $2 Ghosting - Please refresh your browser.

  }
}
on *:JOIN:#: {
  if ($regex($nick($chan,$me).pnick,^('|.|@))) && ($regex($nick,[0-9]+\Z)) { 
    if (%cc. [ $+ [ $chan ] ]) halt
    ghostnick $remove($chan,$chr(37),$chr(35)) $nick 
  }
}
#ghostnick end


Comments 0