try
Code:
on *:text:!code *:#:{
  if (%code) { $iif($2 == %code,msg $chan code confirmed,msg $chan $1- Does Not Match) }
  if (!%code) { 
    set -u10 %code $read(random.txt)
    msg $chan Current code: %code
  }
}


that reads a random line from a text file
I have no idea what you mean by simple or not simple, if you dont like this code by all means write up your own