Advertisement
westor

Bad Idents Protection v1.0 for Konrado

Feb 7th, 2021
1,827
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 1.02 KB | None | 0 0
  1. ; ---- Settings ----
  2.  
  3. alias -l bad_idents_file { return $mircdir $+ badidents.txt }
  4. alias -l bad_idents_ban_time { return 120 } ; 120 = seconds
  5.  
  6. ; ---- Settings ----
  7.  
  8. ON !@*:JOIN:#: { check_bad_ident $nick $chan $ial($nick).user }
  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_ident $newnick %c $ial($newnick).user }
  20.  
  21.     inc %i
  22.   }
  23. }
  24.  
  25. alias -l check_bad_ident {
  26.   var %l = $lines($bad_idents_file)
  27.  
  28.   if (!$1) || (!$2) || (!$3) || (!%l) { return }
  29.  
  30.   var %i = 1
  31.   while (%i <= %l) {
  32.     var %n = $read($bad_idents_file,n,%i)
  33.  
  34.     if (%n == $3) || (%n iswm $3) {
  35.       inc %knum
  36.  
  37.       ban $+(-ku,$bad_idents_ban_time) $2 $1 2 4[Banned] (reason: BAD IDENT ( $+ %n $+ ) are NOT permitted on this channel -- Please change your ident and rejoin! Thank you -13- [Kick id: $chr(35) $+ %knum $+ ] (Expires in: $duration($bad_idents_ban_time) $+ )
  38.     }
  39.  
  40.     inc %i
  41.   }
  42. }
  43.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement