The OP never said the "bot" have to be an ops, even when he have to alert, but i agree it makes sense.In any case there still miss a if statement because the user that type the !command have to be an op too.
#mircscripting @ irc.swiftirc.net == the best mIRC help channel