First question: Is there any particular reason you're using the random number as the item (as opposed to the nick as the item and the random number as the value)?
Code:

  [#channel]
  Nickname=RandomNumber

Next question: Is there any particular reason you are using a random number? None is obvious from the code provided. (Why not $ctime or something else meaningful?)

Next to the last question: Since you are already using hashtables (which are more efficient than .ini files for many reasons), why are you using .ini files at all?

Last question: Why not use the value portion as a tokenized string of info about that nick? For example:
Code:

  [#channel]
  Nickname=EncodedPassword,validmask1,validmask2,validmask3,validmask4

Using either of the above formats would allow you to use:
Code:

on @*:JOIN:#: if ($readini(chanaoplist.db, $chan, $nick)) mode $chan +o $nick


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C