hash tables - 03/02/09 10:22 PM
im trying to write a script but it is limited by windows. Can this script be converted to use hash tables so it will work properly, no matter how much information is there, ie many #channels and tons of nicks.
Code:
alias -l list_chan { set %fii %fii <b> $+ $network ( $+ $me $+ )</b><br> var %a = 1, %b = $chan(0) set %fii %fii <table> while %a <= %b { var %c = 1, %d = $nick($chan(%a),0) while %c <= %d { set %fiinick %fiinick <option> $+ $nick($chan(%a),%c).pnick $+ </option> inc %c } ;<option> </option> set %fii %fii <tr><td><select size="8"> $+ %fiinick $+ </select></td><td><b> $+ $chan(%a) $+ </b> $& <br>---Topic: $& $chan(%a).topic $+ <br>---Mode: $chan(%a).mode $+ <br>---Key: $& $chan(%a).key $+ <br>---Limit: $chan(%a).limit $+ <br>---Users: $& $nick($chan(%a),0,a) <b>(@: $nick($chan(%a),0,o) $+ ;%: $& $nick($chan(%a),0,h) $+ ;+: $nick($chan(%a),0,v) $+ )</b></td></tr><tr><td> </td><td> </td></tr> inc %a unset %fiinick } set %fii %fii </table> return %fii }