Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; ---- Settings ----
- alias -l bad_nicks_file { return $mircdir $+ badnicks.txt }
- alias -l bad_nicks_ban_time { return 120 } ; 120 = seconds
- ; ---- Settings ----
- ON !@*:JOIN:#: { check_bad_nick $nick $chan }
- ON !*:NICK: {
- var %t = $comchan($newnick,0)
- if (!%t) { return }
- var %i = 1
- while (%i <= %t) {
- var %c = $comchan($newnick,%i)
- if (%c) && ($me isop %c) { check_bad_nick $newnick %c }
- inc %i
- }
- }
- alias -l check_bad_nick {
- var %l = $lines($bad_nicks_file)
- if (!$1) || (!$2) || (!%l) { return }
- var %i = 1
- while (%i <= %l) {
- var %n = $read($bad_nicks_file,n,%i)
- if (%n == $1) || (%n iswm $1) {
- inc %knum
- ban $+(-ku,$bad_nicks_ban_time) $2 $1 2 4[Banned] (reason: BAD NICKNAME ( $+ %n $+ ) are NOT permitted on this channel -- Please change your real nickname and rejoin! Thank you -13- [Kick id: $chr(35) $+ %knum $+ ] (Expires in: $duration($bad_nicks_ban_time) $+ )
- }
- inc %i
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement