Advertisement
Skreffnet

HLIST - Comando que te permite listar las tablas hash y sus ítems.

Aug 15th, 2022 (edited)
2,178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 0.93 KB | Source Code | 0 0
  1. alias hlist {
  2.   echo -aic info -
  3.   if ($1 == $null) {
  4.     var %i = 1, %n = $hget(0)
  5.     echo -aic info * /HLIST: Hay un total de $theme(&primary;,%n) item(s).
  6.     while (%i <= %n) {
  7.       echo -aic info * %i $+ : $hget(%i) ( $+ $hget(%i,0).item $+ / $+ $hget(%i).size $+ )
  8.       inc %i
  9.       if (%i > %n) {  
  10.         echo -aic info * INFO: Para obtener más información acerca de un item, escriba $theme(&primary;,/HLIST <item>)  
  11.         halt
  12.       }
  13.     }
  14.   }
  15.   else {
  16.     var %t = $hget($1), %i = 1, %n = $hget(%t,0).item
  17.     echo -aic info * /HLIST: Hay un total de $theme(&primary;,%n) item(s) para $theme(&primary;,$1) $+ .
  18.     while (%i <= %n) {
  19.       var %item = $hget(%t,%i).item
  20.       var %data = $hget(%t,%item)
  21.       var %unset = $hget(%t,%item).unset
  22.       echo -aic info * $base(%i,10,10,3) $+ : %t $+ : $iif(%unset,[[ $+ %unset $+ s]) %item = %data
  23.       inc %i
  24.     }
  25.   }
  26.   echo -aic info - Fin de la lista -
  27. }
  28.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement