Jump to content

Archived

This topic is now archived and is closed to further replies.

chain

Repeat Kicker

Recommended Posts

  • Administrators
>Repeat Kicker for Ops

by: Geniux

=================



The Codes:

-------------



on ^@1:text:*:#:{

 if ($nick isreg $chan) {

   .inc -u20 %rp. [ $+ [ $mask($fulladdress,3) ] $+ . $+ [ $chan ] $+ . $+ [ $remove($left($strip($1-),30),$chr(32)) ] ] 1

   if (%rp. [ $+ [ $mask($fulladdress,3) ] $+ . $+ [ $chan ] $+ . $+ [ $remove($left($strip($1-),30),$chr(32)) ] ] == 4) {

     if ($nick ison $chan) { .raw -q kick $chan $nick :*** Repeating more than 3 within 20 sec }

     .mode $chan +b $mask($fulladdress,3) | .ignore -u30 $wildsite | haltdef

   } 

   else goto end

 }

 :end

}



**** Discussion :



Even_type  :   This event will trigger only if you have op status (@) in the channel. The ^ prefix is used to halt the triggered scripts

Line 1        :   The script will invoke on Regular User (non-op/voice op) in the channel.

  Line 2      :   Automatically create a variables with user address mask of 3 ( *!xxxx@***.xxx.xxx) and get 30 characters from the text ( spaces remove )

                      This code will increase within 20 sec if the same text is repeated

  Line 3      :    Using if statement, it checks whether the repetition has reached the limit ( thus it is 4 ). If matched, the next line of code will proceed.

   Line 4     :    First it check for nick if it is in ( on ) the triggered channel ( ...remember...fast parting, chanmode -n ). If the nick is on the channel, the script will kick the user

   Line 5     :   Using /mode # +b, it will set ban using mask no. 3. Opposite from /ban, /mode # +b doesn't use /userhost to get the user's information. Thus server won't return

                     error raw if the nick wasn't there. Then, it will put the repeater into ignore list for 30 sec. Lastly, it halt the fourth text. So your screen will look nice.

  Line 6      :  will go to :end if the if statement was false

Line 7        :  :end group



Link to comment
Share on other sites



×
×
  • Create New...