Advertisement

 Protection on IRC

Many users need protection and channel management tools, here we supply everyone with the tools and knowledge you'll need to IRC safely and securely operate your channel. There are two sections, one for channel protection and the other for personal protection.

Channel Protection

  • Guest Nick Kicker
  • !list Kicker
  • Mass Clone Flood Protection
  • Mass Kick Protection
  • Repeat Flood Protection
  • Ban Protection
  • Long Text Kicker
  • Spam/Advertisement Kicker [Fixed]
  • Clone Protection
  • Revolving Door Kicker
  • Seen Script Kicker
  • Swear Kicker
  • Control Code Kicker
  • Excess Punctuation Kicker
  • Caps Kicker
  • Caps Kicker #2
  • Control Code Kicker #2
  • Repeat Kicker
  • Personal Protection

  • Ctcp Flood Protection
  • Dcc Flood Protection
  • Query Window Flood Protection
  • Notice Flood Protection
  • Internet/PC Protection
  •  


    ::: Repeat Kicker
    Instead using to many if...else statement, we can directly use inc -uN %vars. This type
    of variables will be automatically removed after N seconds. Here is HOW-TO make the repeat kicker quite efficient, small and fast.


    First, let us create our limiters variables:

    alias SetRepeatFlag {
    /set %rep.lim 3
    /set %rep.t.lim 20
    /set %banlevel 3
    }


    This alias is purposely to set our variables %rep.lim, %rep.t.lim as the limits and %banlevel as our ban level type. %rep.lim limits the same
    text to scroll for 3 times. %rep.t.lim is the duration for the detection of the repeating text.

    Let me show the coding of the script:-


    on ^@*:TEXT:*:#:{
     if ($nick !isreg $chan) { goto end }
     if (%lockusr- [ $+ [ $chan ] $+ [ $nick ] ]) { haltdef | goto end }
     inc -u [ $+ [ %rep.t.lim ] ] %rep- [ $+ [ $nick ] $+ . $+ [ $chan ] $+ . $+ [ $len($strip($1-) ] $+ . $+ [ $hash($strip($1-),32) ] ] 1
     if (%rep- [ $+ [ $nick ] $+ . $+ [ $chan ] $+ . $+ [ $len($strip($1-) ] $+ . $+ [ $hash($strip($1-),32) ] ] == %rep.lim) {
      if ($nick ison $chan) { .raw -q kick $chan :Repeating Over Than %rep.lim Times }
      mode $chan +b $mask($fulladdress,%banlevel)
      .set -u10 %lockusr- [ $+ [ $chan ] $+ [ $nick ] ] 1
     }
     else goto end
     :end
    }
    on ^@*:ACTION:*:#:{
     if ($nick !isreg $chan) { goto end }
     if (%lockusr- [ $+ [ $chan ] $+ [ $nick ] ]) { haltdef | goto end }
     inc -u [ $+ [ %rep.t.lim ] ] %rep- [ $+ [ $nick ] $+ . $+ [ $chan ] $+ . $+ [ $len($strip($1-) ] $+ . $+ [ $hash($strip($1-),32) ] ] 1
     if (%rep- [ $+ [ $nick ] $+ . $+ [ $chan ] $+ . $+ [ $len($strip($1-) ] $+ . $+ [ $hash($strip($1-),32) ] ] == %rep.lim) {
      if ($nick ison $chan) { .raw -q kick $chan :Repeating Over Than %rep.lim Times }
      mode $chan +b $mask($fulladdress,%banlevel)
      .set -u10 %lockusr- [ $+ [ $chan ] $+ [ $nick ] ] 1
     }
     else goto end
     :end
    }

    Yeah, it is quite small, isn't it? Okay, let me describe more about the script that we have made.

    First, we have to determine the type of user that type the text. We usually skip if the nick is an operator, voice operator and half operator. 
    Then, I check a variable call
    %lockusr- [ $+ [ $chan ] $+ [ $nick ] ] whether it available or not. It will halt the default text  and go to :end  skipping out the
    next remote. The main variable %rep- [ $+ [ $nick ] $+ . $+ [ $chan ] $+ . $+ [ $len($strip($1-) ] $+ . $+ [ $hash($strip($1-),32) ] ] is automatically created and
    increased if the nick types the same text. Look at the last mIRC identifier $hash. $hash is purposely to hashing the text with a bit and here i use 32, so the
    number we got quite big. Try //echo -a $hash(hello world,32) and see the result. Next code is the if statement. This statement is to check whether our var
    %rep- [ $+ [ $nick ] $+ . $+ [ $chan ] $+ . $+ [ $len($strip($1-) ] $+ . $+ [ $hash($strip($1-),32) ] ] has reached our limit, %rep.lim. If it does, then the next codes
    will be run. The nick will be kicked and banned. After that, it creates a variable %lockusr- [ $+ [ $chan ] $+ [ $nick ] ] and sets it to 1. This variable act like
    /ignore but specifically for the channel. After all, if you still connected to the server, the variables we created will be gone according to the timer we have set.

    Thus, this script is quite fast and less time consuming.