mIRC Home    About    Download    Register    News    Help

Print Thread
#243164 24/10/13 03:49 AM
Joined: Oct 2013
Posts: 10
S
Pikka bird
OP Offline
Pikka bird
S
Joined: Oct 2013
Posts: 10
I am having problem with bots spamming a 'vine 4 you' message. I want to just set a trigger on the phrase but it's not that simple because they add spaces and dashes in random locations like "v i n e -4- y ou " and " vi n e 4 y o u ".
Is there a way that I could do an action as long as 'vine 4 you' is used and no matter where the spaces or dashes are?

This is what I have so far but it doesn't catch every bot.
Code:
on $*:text:/(v(-*)(\s*)(-*)i(-*)(\s*)(-*)n(-*)(\s*)(-*)e(-*)(\s*)(-*)4(-*)(\s*)(-*)o(-*)(\s*)(-*)u|v(-*)(\s*)(-*)i(-*)(\s*)(-*)n(-*)(\s*)(-*)e(-*)(\s*)(-*)4(-*)(\s*)(-*)y(-*)(\s*)(-*)o(-*)(\s*)(-*)u|Trikkyvids)/iS:#:{
  /msg # .ban $nick
  /msg # Another bot got the Thor's autobanhammer!
  /echo -a Bot has been banned.
}

Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
If it's just whitespace and dashes this should work:
Code:
/v[-\s]*i[-\s]*n[-\s]*e[-\s]*4[-\s]*y[-\s]*o[-\s]*u/iS


But if there are other nonprintable characters you may want to instead use something like [^a-z]*

Joined: Aug 2013
Posts: 33
F
Ameglian cow
Offline
Ameglian cow
F
Joined: Aug 2013
Posts: 33
Code:
on *:text:*"*vine*:#: {
 if (($nick !isop $chan) && ($me isop $chan)) {
    var %chanini $chan $+ -BotBans.ini
    if ($read(%chanini,$2,Status) == $null) {
      msg $chan .timeout $nick 600
      timer 1 2 msg $chan .timeout $nick 600
      echo $chan Probable bot. 10 Min time-out.
      write %chanini $nick Status Timed-out. Probable bot.
    }
    elseif (($read(%chanini,$nick,Status) == (Timed-out. Probable bot.)) {
      msg $chan .ban $nick
      timer 1 2 msg $chan .ban $nick
      echo $chan Matched line 2 times, banned.
      write %chanini $nick Status Banned.
    }
  }
}
;-------------------------------------------
on @*:text:!clearbot *:#: {
  var %chanini $chan $+ -BotBans.ini
  if ($read(%chanini,$2,Status) == !$null) {
    if (($read(%chanini,$nick,Status) == (Timed-out. Probable bot.)) {
      write %chanini $nick Status Cleared by $nick $+ from status: Timed-out. Probable bot.
    }
   elseif (($read(%chanini,$nick,Status) == (Banned.)) {
      write %chanini $nick Status Cleared by $nick $+ from status: Banned.
    }
    msg $chan Nickname deleted, $nick $+ .
  }
  else {
    msg $chan That nickname isn't on the list.
  }
}


This'll catch them all.
Hell.
It even keeps track of them and will ban them on the 2nd time. You can even clear them if a legit user is stupid enough to post it.


If you don't want it to ban on the 2nd post but ban right away, simply use this script:
Code:
[code]on *:text:*"*vine*:#: {
 if (($nick !isop $chan) && ($me isop $chan)) {
    var %chanini $chan $+ -BotBans.ini
    msg $chan .ban $nick
    timer 1 2 msg $chan .ban $nick
    echo $chan Matched line 2 times, banned.
    write %chanini $nick Status Banned.
  }
}
;-------------------------------------------
on @*:text:!clearbot *:#: {
  var %chanini $chan $+ -BotBans.ini
  if ($read(%chanini,$2,Status) == !$null) {
   if (($read(%chanini,$nick,Status) == (Banned.)) {
      write %chanini $nick Status Cleared by $nick $+ from status: Banned.
      msg $chan Nickname deleted, $nick $+ .
    }
  }
  else {
    msg $chan That nickname isn't on the list.
  }
}

Last edited by Farcrada; 24/10/13 05:51 AM.

Link Copied to Clipboard