admin: join channel when invited

master
mutantmonkey 2012-01-03 13:55:28 -05:00
parent e2535ab621
commit 9cd3578ed1
1 changed files with 39 additions and 31 deletions

View File

@ -20,6 +20,14 @@ join.rule = r'\.join (#\S+)(?: *(\S+))?'
join.priority = 'low'
join.example = '.join #example or .join #example key'
def autojoin(phenny, input):
"""Join the specified channel when invited by an admin."""
if input.admin:
channel = input.group(1)
phenny.write(['JOIN'], channel)
autojoin.event = 'INVITE'
autojoin.rule = r'(.*)'
def part(phenny, input):
"""Part the specified channel. This is an admin-only command."""
# Can only be done in privmsg by an admin