tglogo.png
0 LIKES

Snippet


Anti PM spam by simo

In Category General IRC Posted by Snippets On 12/06/23
Tags: anti spam pm simo 

this kick bans users that send u PM right after u join a channel ( within 2 seconds line 1 in the code ) and obviously u need to be opped on the channels
ON ME:*:JOIN:#: {   inc -u2  %Auto-PM-Spam. [ $+ [ $chan ] $+ ] . [ $+ [ $network ] ]  }

ON *:TEXT:*:?:{ 
  var %PM-SPammer = 1
  while ($chan(%PM-SPammer)) {
    var %PM-spam-chan $ifmatch
    ; this exempts certain users from gettin kicked
    if ( $nick(%PM-spam-chan,$me,@&~%) && !$regex($nick,/^((admin|oper|nick|chan|memo)Serv|global)$/i)) {
      if (%Auto-PM-Spam. [ $+ [ %PM-spam-chan ] $+ ] . [ $+ [ $network ] ]) {  kick  %PM-spam-chan  $nick --[Dont PM-spam users]--   } 
    }
    inc %PM-SPammer
  } 
}


Comments 0


Please note that on our website we use cookies necessary for the functioning of our website, cookies that optimize the performance. To learn more about our cookies, how we use them and their benefits, please read our Cookie Policy.
I Understand