Advertisement
debiangr

Untitled

Apr 13th, 2023
584
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 1.38 KB | None | 0 0
  1. ON *:START: {
  2.   var %h = WHITEHOST
  3.   var %f = $mircdirdata\ $+ %h $+ .list
  4.  
  5.   if (!$file(%f)) { return }
  6.  
  7.   hmake %h 3000
  8.   hload %h $qt(%f)
  9. }
  10.  
  11. alias hostadd {
  12.   tokenize 32 $strip($1-)
  13.  
  14.   var %h = WHITEHOST
  15.   var %d = $hfind(%h,$1,0,W).data
  16.  
  17.   if (!$1) { echo 4 -gate Error: Please specify a parameter! | return }
  18.   if (%d) { echo 4 -gate Error: Already exists $qt($1) in %h list! | return }
  19.  
  20.   hadd -m %h $ctime $1
  21.   hsave %h $qt($mircdirdata\ $+ %h $+ .list)
  22.  
  23.   unbanall $1
  24.  
  25.   echo 3 -gate Added $qt($1) in the %h list. - Total: $hget(%h,0).item
  26. }
  27.  
  28. alias hostdel {
  29.   tokenize 32 $strip($1-)
  30.  
  31.   var %h = WHITEHOST
  32.   var %d = $hfind(%h,$1,1,W).data
  33.  
  34.   if (!$1) { echo 4 -gate Error: Please specify a parameter! | return }
  35.   if (!%d) { echo 4 -gate Error: Not exists $qt($1) on the %h list! | return }
  36.  
  37.   hdel %h %d
  38.   hsave %h $qt($mircdirdata\ $+ %h $+ .list)
  39.  
  40.   echo 3 -gate Removed $qt($1) from the %h list. - Total: $hget(%h,0).item
  41. }
  42.  
  43. alias hostlist {
  44.   var %h = WHITEHOST
  45.   var %t = $hget(%h,0).item
  46.  
  47.   if (!%t) { echo 4 -gate Error: %h list is empty! | return }
  48.  
  49.   echo 10 -gate Display all %h list..
  50.  
  51.   var %i = 1
  52.   while (%i <= %t) {
  53.     var %item = $hget(%h,%i).item
  54.     var %data = $hget(%h,%item)
  55.  
  56.     if (%item) && (%data) { echo 6 -gate $+($chr(35),%i,:) %data - Added on: $asctime(%item) }
  57.  
  58.     inc %i
  59.   }
  60.  
  61.   echo 10 -gate End of %h list.
  62. }
  63.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement