From 7770268bc80b7a583a33e55beef62f0e7990229d Mon Sep 17 00:00:00 2001 From: bui Date: Fri, 23 Aug 2013 03:22:29 +0100 Subject: [PATCH] [admin] Join channels on invite --- admin.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/admin.py b/admin.py index 30888be15b..83be2decaa 100644 --- a/admin.py +++ b/admin.py @@ -119,6 +119,18 @@ def me(bot, trigger): bot.msg(channel, msg) +@willie.module.event('INVITE') +@willie.module.rule('.*') +@willie.module.priority('low') +def invite_join(bot, trigger): + """ + Join a channel willie is invited to, if the inviter is an admin. + """ + if not trigger.admin: + return + bot.write(('JOIN', trigger.args[1])) + + @willie.module.event('KICK') @willie.module.rule(r'.*') @willie.module.priority('low')