askcompu

Untitled

Aug 3rd, 2015
336
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.51 KB | None | 0 0
  1. def quit(phenny, input):
  2.     """Quit from the server. This is an owner-only command."""
  3.     # Can only be done in privmsg by the owner
  4.     if input.sender.startswith('#'):
  5.         return
  6.     if input.owner:
  7.         # TODO: add optional arguments for a quit message
  8.         a = input.group(2)
  9.         if a:
  10.             phenny.write(['QUIT'], a)
  11.             __import__('os')._exit(0)
  12.         else:
  13.             phenny.write(['QUIT'])
  14.             __import__('os')._exit(0)
  15. quit.commands = ['quit']
  16. quit.priority = 'high'
Advertisement
Add Comment
Please, Sign In to add comment