I'm quite new to mIRC scripting and have had some coding experience in other languages, but I'm having trouble with this.
To make the banall command I am using a hash table, and the code is as follows:

on *:JOIN:#raku:{
/hadd -s Users_on_channel $address }
}

on *:PART:#raku:{
/hdel -s Users_on_channel $address }

on *:TEXT:*:#raku: {
if ($nick isop $chan && $me isop $chan) {
if ($1 == .banall) { set %var $hget(Users_on_channel,0).item ;returns amount of values in the hash table
set %i 1
while (%i <= %var)
{
/ban $chan $hget(Users_on_channel, %i).data
inc %i
}
}
}

Is there a more efficeint way of doing this or fixing the code?
And yes, the table exists.


Last edited by Starasdsd; 17/01/12 11:22 PM.