Anti PM spam

By simo on Jul 04, 2017

this kick bans users that send u PM right after u join a channel ( within 3 seconds line 1 in the code ) and obviously u need to be opped on the channels

ON ME:*:JOIN:#: {   inc -u3  %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

Sign in to comment.
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.