using the || isn't necessary in this script that means or, so for example if i'm mod in a channel and the bot is not and i try to use the command the bot will still try to do it. you should use && but there is a quicker way than that if you add a @ on the on text event itself
on @*:text. the @ means if the bot/person hosting the script is mod thus rendering the if ($me isop $chan) part uneeded