diff --git a/willie/modules/admin.py b/willie/modules/admin.py index c9d57f9276..f3ed15b0f5 100644 --- a/willie/modules/admin.py +++ b/willie/modules/admin.py @@ -22,6 +22,7 @@ def configure(config): | hold_ground | False | Auto re-join on kick | """ config.add_option('admin', 'hold_ground', "Auto re-join on kick") + config.add_option('admin', 'auto_accept_invites', "Auto Accept All Invites") @willie.module.commands('join') @@ -131,10 +132,10 @@ def invite_join(bot, trigger): """ Join a channel willie is invited to, if the inviter is an admin. """ - if not trigger.admin: + if trigger.admin or bot.config.admin.auto_accept_invite: + bot.join(trigger.args[1]) return - bot.join(trigger.args[1]) - + return NOLIMIT @willie.module.event('KICK') @willie.module.rule(r'.*')