Alright, one little thing though, else { /msg # 4 sorry you dont have access to that Command } would you really like so the all of the channel sees that $nick cannt use the command, try to use .notice instead of /msg , thats all i can say otherwise not bad .
Make a file called randpm.txt add a few things ( like hi ) type /enable #qr
{ what this does is when someone says something in P.m it reads from randpm.txt randomly }