Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias -l ban_nick_time { return 120 } ; 120 = seconds
- alias -l ban_type { return 2 } ; /help $mask for more ban types
- alias -l ban_nicks_exceptions { return PC Kendy BotServ PC1 }
- alias -l ban_chars_match_limit { return 4 } ; 4 = chars to match, eg: "hiiii" will match
- alias -l ban_chars_match_case_insensitive { return 1 } ; 1 = will match on "HiIIiIiIIiI" , use 0 to disable it
- #repeatchar on
- ; Regex made by maroon
- ON @*:TEXT:*:#: {
- tokenize 32 $strip($1-)
- var %p = /\b(\S*(.)\2{ $+ $calc($ban_chars_match_limit - 1) $+ })\b/ $+ $iif($ban_chars_match_case_insensitive,i)
- if ($regex($1-,%p)) { rp_check $nick $chan $regml(1) }
- }
- ON @$*:ACTION:/\b(\S*(.)\2{5})\b/iS:#: {
- tokenize 32 $strip($1-)
- var %p = /\b(\S*(.)\2{ $+ $calc($ban_chars_match_limit - 1) $+ })\b/ $+ $iif($ban_chars_match_case_insensitive,i)
- if ($regex($1-,%p)) { rp_check $nick $chan $regml(1) }
- }
- alias -l rp_check {
- if (!$1) || (!$2) || (!$3) || ($me !ison $2) || ($1 !ison $2) || ($1 !isreg $2) || ($istok($ban_nicks_exceptions,$1,32)) { return }
- inc %knum 1
- ban $+(-ku,$ban_nick_time) $2 $1 $ban_type 4[Banned] (reason: Do NOT repeat letters/words/emotions/symbols/characters/numbers/blanks ( $+ $3- $+ ) in this channel -- for more information regarding your ban please contact nickname Kendy for removal -13- [Kick id: $chr(35) $+ %knum $+ ] (Expires in: $duration($ban_nick_time) $+ )
- }
- #repeatchar end
- menu channel,status,query,menubar {
- -
- [26] Repeat Character Kick Ban [hiiiiii] ( $+ $upper($group(#repeatchar)) $+ )
- .$iif($group(#repeatchar) == On,$style(3)) On: { .enable #repeatchar | echo -a *** 4Repeat Char detected is now ON }
- .-
- .$iif($group(#repeatchar) == Off,$style(3)) Off: { .disable #repeatchar | echo -a *** 4Repeat Char detected is now OFF }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement