Skip to content
TG007 community snippet #152

Anti PM spam by 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

By Snippets Added Dec 6, 2023
General IRC All snippets
mIRC script 13 lines
About this snippet

Overview

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
Source code

mIRC script

13 lines · 529 characters
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
  } 
}
Community

Comments

Want to join the discussion? Sign in to TG007.
No comments yet. Start the discussion.