Advertisement
debiangr

Untitled

Apr 18th, 2023 (edited)
639
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 1.98 KB | None | 0 0
  1. #BLACKLIST on
  2. #BLACKLIST end
  3.  
  4. menu status,channel,query {
  5.   BLACKLIST On Join
  6.   .On:.enable #BLACKLIST | echo -a 4* BLACKLIST Is ON * 
  7.   .Off:.disable #BLACKLIST | echo -a 4* BLACKLIST Is OFF * 
  8.  
  9. }
  10.  
  11. alias -l channel { return #test1 }
  12.  
  13. ON !*:JOIN:$($channel): {
  14.   if ($group(#BLACKLIST).status !== on) { return }
  15.   if (!$hfind(BLIST,$fulladdress,1,W).data) { return }
  16.  
  17.   xact $nick $chan ban 7200 4 reason
  18.  
  19.   ;if (!$ulist(%host,host,0)) { xact $nick $chan ban 3600 4 reason }
  20.   ;                           /xact <nick> <#chan> <kick|ban|kb|kickban> [ban-time] [ban-type] [kick-reason]
  21. }
  22.  
  23.  
  24. ON *:START: {
  25.   var %h = BLIST
  26.   var %f = $mircdirdata\ $+ %h $+ .list
  27.  
  28.   if (!$file(%f)) { return }
  29.  
  30.   hmake %h 3000
  31.   hload %h $qt(%f)
  32. }
  33.  
  34. alias bhadd {
  35.   tokenize 32 $strip($1-)
  36.  
  37.   var %h = BLIST
  38.   var %d = $hfind(%h,$1,0,W).data
  39.  
  40.   if (!$1) { echo 4 -gate Error: Please specify a parameter! | return }
  41.   if (%d) { echo 4 -gate Error: Already exists $qt($1) in %h list! | return }
  42.  
  43.   hadd -m %h $ticksqpc $+ $rands(1,100000000) $1
  44.   hsave %h $qt($mircdirdata\ $+ %h $+ .list)
  45.  
  46.   echo 3 -gate Added $qt($1) in the %h list. - Total: $hget(%h,0).item
  47. }
  48.  
  49. alias bhdel {
  50.   tokenize 32 $strip($1-)
  51.  
  52.   var %h = BLIST
  53.   var %d = $hfind(%h,$1,1,W).data
  54.  
  55.   if (!$1) { echo 4 -gate Error: Please specify a parameter! | return }
  56.   if (!%d) { echo 4 -gate Error: Not exists $qt($1) on the %h list! | return }
  57.  
  58.   hdel %h %d
  59.   hsave %h $qt($mircdirdata\ $+ %h $+ .list)
  60.  
  61.   echo 3 -gate Removed $qt($1) from the %h list. - Total: $hget(%h,0).item
  62. }
  63.  
  64. alias bhlist {
  65.   var %h = BLIST
  66.   var %t = $hget(%h,0).item
  67.  
  68.   if (!%t) { echo 4 -gate Error: %h list is empty! | return }
  69.  
  70.   echo 10 -gate Display all %h list..
  71.  
  72.   var %i = 1
  73.   while (%i <= %t) {
  74.     var %item = $hget(%h,%i).item
  75.     var %data = $hget(%h,%item)
  76.  
  77.     if (%item) && (%data) { echo 6 -gate $+($chr(35),%i,:) %data - Added on: $asctime(%item) }
  78.  
  79.     inc %i
  80.   }
  81.  
  82.   echo 10 -gate End of %h list. - Total: %t
  83. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement