Skip to content
TG007 community snippet #157

Anti-Mass-Nick-change by simo

this will get rid of mass nick changes on channel and also will check for irccloud host and ban appropriately credits go to Neo Nemesis i modified his code a bit

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

Overview

this will get rid of mass nick changes on channel and also will check for irccloud host and ban appropriately

credits go to Neo Nemesis i modified his code a bit
Source code

mIRC script

42 lines · 1,502 characters
ON  *:nick: {
  set -u3 %mjn1 $addtok(%mjn1,$newnick,44)
  var %ecnt8NX = 1
  while ( $comchan($newnick,%ecnt8NX) != $null )  {
    var %nickfldchan $v1
    hinc -mu3 massnick %nickfldchan 1
    if ($nick(%nickfldchan,$me,@%&~)) {
      if ($hget(massnick,%nickfldchan) > 2) {
        if (%nickschan != $true) {
          echo %nickfldchan 08,12 Nick-Flood Detected 
          .raw mode %nickfldchan +MR
          .set -u3 %nickschan $true
          set -u3 %mjn2 1
          .timermjnR 1 30 mode %nickfldchan -R
          .timermjnM 1 120 mode %nickfldchan -M          
}
        while (%mjn2 <= $numtok(%mjn1,44)) {
          if ($gettok(%mjn1,%mjn2,44) ison %nickfldchan) {
            ban35RT $gettok(%mjn1,%mjn2,44) %nickfldchan  
            if (%mjn2 <=  15) { kick %nickfldchan $gettok(%mjn1,%mjn2,44) Mass Nick-Change Detected  -1- } 
            if (%mjn2  >= 16) { kick %nickfldchan $gettok(%mjn1,%mjn2,44) Mass Nick-Change Detected -2- } 
          }
          inc %mjn2
        }
      }
    }
    inc %ecnt8NX
  }
}

Alias ban35RT {
 if ($regex($address($1,2),/(irccloud)/i)) { mode $2 +b $regsubex($mid($address($1,0),3),/(~?[^@]+)@.*(?=\.[^.]+\..+)/,*!\1@*\2)   | halt  } 
 elseif (!$regex($gettok($address($1,2),-1,64),/[a-zA-Z]/g)) { 
    mode $2 +b $+($gettok($address($1,2),1-3,46),.*)
  }    
  else {
    mode $2 +b $+(*!*@*.,$gettok($address($1,2),2-,46))  
  } 
}

ON *:LOAD:{ hmake massnick 100  }
On *:start: { hmake massnick 100 }
Community

Comments

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