If you want to keep the exact same old structure, and have each command have its own hash table, you can do that. I'd suggest having one hash table for each channel (like in my example), and just have the required level/command/whatever in the same item. If you use the example, you can copy most of the script without having to change anything.

It shouldn't be too hard to create rest of the script or update the old one based on the example.

For permission part of the script, it's easy to change the example:
Code:
elseif ((!%f. $+ $1) || ($nick == $mid(#,2))) && ($hget(cmds. $+ #,$1)) {
  var %x = 1,%m $gettok($v1,1,32),%c $replace($gettok($v1,2-,32),@user,$displayName($nick),@target,$iif($followName($2),$followName($2),$captial($2-)))
  if (($read(data\Operators_List\Op_List_ $+ $mid(#,2) $+ .txt,nw,$nick)) && (m isin %m)) || ($nick == $mid(#,2)) || (e isin %m) {
    set -eu5 %f. $+ $1 1
    while ($gettok(%c,%x,124)) { describe # $v1 | inc %x }
  }
}

It checks for the following things:
- If the $nick is $mid(#,2) and "o" is in the first token of the item.
- If the $nick is in "Op_List_..." file and if "m" is in the first token of the item. (I'd recommend loading the data into a hash table.)
- If "e" is in the first token of the item.

If any one the conditions above are met, it executes the command.

When adding the commands with the example, the format would be: "!cadd <command> <access level> <message>". Possible access levels would be o (owner), m (moderator) and e (everyone). You could use any combination of them.

As an example: !cadd !ohai om Hello|Hi|Ohai|Go away

That command would be available for owner and moderators.