diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2013-07-25 19:26:52 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2015-12-03 03:29:37 +0100 |
commit | f3b86ed2d5bce85b3b9c27eb949cd88cf7d526bc (patch) | |
tree | a187725f5ec7f1c67d2b9a471b4000ad40a16b04 /modules/admin.py | |
parent | 4b905606692a2f147946505abe6ade1c241d1000 (diff) | |
download | bot-f3b86ed2d5bce85b3b9c27eb949cd88cf7d526bc.tar.gz bot-f3b86ed2d5bce85b3b9c27eb949cd88cf7d526bc.tar.bz2 bot-f3b86ed2d5bce85b3b9c27eb949cd88cf7d526bc.zip |
fix indentation and trailing whitespaces
Diffstat (limited to 'modules/admin.py')
-rwxr-xr-x | modules/admin.py | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/modules/admin.py b/modules/admin.py index b42822a..93f8448 100755 --- a/modules/admin.py +++ b/modules/admin.py @@ -7,57 +7,57 @@ Licensed under the Eiffel Forum License 2. http://inamidst.com/phenny/ """ -def join(phenny, input): - """Join the specified channel. This is an admin-only command.""" - # Can only be done in privmsg by an admin - if input.sender.startswith('#'): return - if input.admin: - channel, key = input.group(1), input.group(2) - if not key: - phenny.write(['JOIN'], channel) - else: phenny.write(['JOIN', channel, key]) +def join(phenny, input): + """Join the specified channel. This is an admin-only command.""" + # Can only be done in privmsg by an admin + if input.sender.startswith('#'): return + if input.admin: + channel, key = input.group(1), input.group(2) + if not key: + phenny.write(['JOIN'], channel) + else: phenny.write(['JOIN', channel, key]) join.rule = r'\.join (#\S+)(?: *(\S+))?' join.priority = 'low' join.example = '.join #example or .join #example key' -def part(phenny, input): - """Part the specified channel. This is an admin-only command.""" - # Can only be done in privmsg by an admin - if input.sender.startswith('#'): return - if input.admin: - phenny.write(['PART'], input.group(2)) +def part(phenny, input): + """Part the specified channel. This is an admin-only command.""" + # Can only be done in privmsg by an admin + if input.sender.startswith('#'): return + if input.admin: + phenny.write(['PART'], input.group(2)) part.commands = ['part'] part.priority = 'low' part.example = '.part #example' -def quit(phenny, input): - """Quit from the server. This is an owner-only command.""" - # Can only be done in privmsg by the owner - if input.sender.startswith('#'): return - if input.owner: - phenny.write(['QUIT']) - __import__('os')._exit(0) +def quit(phenny, input): + """Quit from the server. This is an owner-only command.""" + # Can only be done in privmsg by the owner + if input.sender.startswith('#'): return + if input.owner: + phenny.write(['QUIT']) + __import__('os')._exit(0) quit.commands = ['quit'] quit.priority = 'low' -def msg(phenny, input): - # Can only be done in privmsg by an admin - if input.sender.startswith('#'): return - a, b = input.group(2), input.group(3) - if (not a) or (not b): return - if input.admin: - phenny.msg(a, b) +def msg(phenny, input): + # Can only be done in privmsg by an admin + if input.sender.startswith('#'): return + a, b = input.group(2), input.group(3) + if (not a) or (not b): return + if input.admin: + phenny.msg(a, b) msg.rule = (['msg'], r'(#?\S+) (.+)') msg.priority = 'low' -def me(phenny, input): - # Can only be done in privmsg by an admin - if input.sender.startswith('#'): return - if input.admin: - msg = '\x01ACTION %s\x01' % input.group(3) - phenny.msg(input.group(2) or input.sender, msg) +def me(phenny, input): + # Can only be done in privmsg by an admin + if input.sender.startswith('#'): return + if input.admin: + msg = '\x01ACTION %s\x01' % input.group(3) + phenny.msg(input.group(2) or input.sender, msg) me.rule = (['me'], r'(#?\S+) (.+)') me.priority = 'low' -if __name__ == '__main__': - print __doc__.strip() +if __name__ == '__main__': + print __doc__.strip() |