Advertisement
westor

Bad Nicknames Protection v2.0 for Kendy

Jan 9th, 2021 (edited)
1,780
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 0.98 KB | None | 0 0
  1. ; ---- Settings ----
  2.  
  3. alias -l bad_nicks_file { return $mircdir $+ badnicks.txt }
  4. alias -l bad_nicks_ban_time { return 120 } ; 120 = seconds
  5.  
  6. ; ---- Settings ----
  7.  
  8. ON !@*:JOIN:#: { check_bad_nick $nick $chan }
  9.  
  10. ON !*:NICK: {
  11.   var %t = $comchan($newnick,0)
  12.  
  13.   if (!%t) { return }
  14.  
  15.   var %i = 1
  16.   while (%i <= %t) {
  17.     var %c = $comchan($newnick,%i)
  18.  
  19.     if (%c) && ($me isop %c) { check_bad_nick $newnick %c }
  20.  
  21.     inc %i
  22.   }
  23. }
  24.  
  25. alias -l check_bad_nick {
  26.   var %l = $lines($bad_nicks_file)
  27.  
  28.   if (!$1) || (!$2) || (!%l) { return }
  29.  
  30.   var %i = 1
  31.   while (%i <= %l) {
  32.     var %n = $read($bad_nicks_file,n,%i)
  33.  
  34.     if (%n == $1) || (%n iswm $1) {
  35.       inc %knum
  36.  
  37.       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) $+ )
  38.     }
  39.  
  40.     inc %i
  41.   }
  42. }
  43.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement