I use something similar to this...

Code:
 

alias trusted { 
  if ($readini(trusted.ini,$2,$1)) return 1 
} 

on *:text:!trust*:#: {
  if ($nick == YOURUSERNAMEHERE) {
    writeini trusted.ini # $2 1
  }
  else return
}

;;Then to use in the command

on *:text:!wahh*:#: {
 if ($trusted($nick,#)) {
   write wahh.txt $2- $+ 
   msg $chan /me fsudikjhfb
 }
  else return
}