I know this is going to seem really dumb however I am trying to code my bot to only disconnect when an op uses the command. I would also like it to say 'Sorry but you do not have permission to do this if a normal user uses it.
Code so far:
on $*:TEXT:!disconnect:#:{
if ($nick isop $chan) { msg $chan Goodbye everyone! I have been asked to disconnect! }; { /disconnect }
else { msg $chan Sorry but you cannot use this command! }
}