Advertisement
westor

FullAddress Akick for End^Games v1.2

Jun 17th, 2020
2,125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 0.59 KB | None | 0 0
  1. ON @!*:JOIN:#: { .timer[BL_ $+ $nick $+ _CHECK] 1 3 bl_check $nick $chan $fulladdress }
  2.  
  3. alias -l bl_check {
  4.   var %f = akicks.ini
  5.   var %t = $ini(%f,list,0)
  6.  
  7.   if ($0 !== 3) || ($me !ison $2) || ($me !isop $2) || ($1 !isreg $2) || (!$file(%f)) || (!%t) { return }
  8.  
  9.   var %i = 1
  10.   while (%i <= %t) {
  11.     var %s = $ini(%f,list,%i)
  12.     var %v = $readini(%f,n,list,%s)
  13.     var %h = $gettok(%v,1,32)
  14.     var %r = $gettok(%v,2-,32)
  15.  
  16.     if (!%s) || (!%h) { goto next }
  17.     if (%h !iswm * $+ $3 $+ *) { goto next }
  18.  
  19.     ban -k $2 $1 2 $iif(%r,$v1,Banned!)
  20.  
  21.     :next
  22.     inc %i
  23.   }
  24.  
  25. }
  26.  
  27. alias blacklistadd {
  28.   if (!$1) { echo 4 -eat * /blacklistadd: Error, Insert a mask! | return }
  29.   if (!$2) { echo 4 -eat * /blacklistadd: Error, Insert a reason! | return }
  30.  
  31.   var %f = akicks.ini
  32.   var %id = $crc($1,0)
  33.   var %r = $readini(%f,n,list,%id)
  34.  
  35.   if (%r) { echo 4 -eat * /blacklistadd: Error, $qt($1) Already exists! | return }
  36.  
  37.   writeini -n $qt(%f) list %id $1 $2-
  38.  
  39.   echo -eat * /blacklistadd: Added $qt($1) with reason $qt($2-)
  40. }
  41.  
  42. alias blacklistdel {
  43.   if (!$1) { echo 4 -eat * /blacklistdel: Error, Insert a mask! | return }
  44.   var %f = akicks.ini
  45.   var %t = $ini(%f,list,0)
  46.   var %id = $crc($1,0)
  47.   var %r = $readini(%f,n,list,%id)
  48.   var %i = $gettok(%r,1,32)
  49.   var %a = $gettok(%r,2-,32)
  50.  
  51.   if (!$file(%f)) { echo 4 -eat * /blacklistdel: Error, File is not exists or it is empty! | return }
  52.   if (!%t) { echo 4 -eat * /blacklistdel: Error, The database is empty! | return }
  53.   if (!%r) { echo 4 -eat * /blacklistdel: Error, $qt($1) Not exists! | return }
  54.  
  55.   remini $qt(%f) list %id
  56.  
  57.   echo -eat * /blacklistdel: Removed $qt(%i) with reason $qt(%a)
  58. }
  59.  
  60.  
  61. alias blacklist {
  62.   var %f = akicks.ini
  63.   var %t = $ini(%f,list,0)
  64.  
  65.   if (!$file(%f)) { echo 4 -eat * /blacklist: Error, File is not exists or it is empty! | return }
  66.   if (!%t) { echo 4 -eat * /blacklist: Error, The database is empty! | return }
  67.  
  68.   echo -eat * /blacklist: Start of list...
  69.  
  70.   var %i = 1
  71.   while (%i <= %t) {
  72.     var %m = $ini(%f,list,%i)
  73.     var %r = $readini(%f,n,list,%m)
  74.     var %e = $gettok(%r,1,32)
  75.     var %n = $gettok(%r,2-,32)
  76.  
  77.     if (%e) && (%n) { echo -a * $chr(35) $+ %i $+ : %e - %n }
  78.  
  79.     inc %i
  80.   }
  81.  
  82.   echo -eat * /blacklist: End of list - (Total: %t $+ )
  83. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement