Skip to content

Commit

Permalink
Add config option and auto-invite feature!
Browse files Browse the repository at this point in the history
  • Loading branch information
johnlage committed Jun 26, 2014
1 parent b549625 commit 27fe72f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -131,7 +132,7 @@ def invite_join(bot, trigger):
"""
Join a channel willie is invited to, if the inviter is an admin.
"""
if not trigger.admin:
if not trigger.admin and not bot.config.admin.auto_accept_invite:
return
bot.join(trigger.args[1])

Expand Down

0 comments on commit 27fe72f

Please sign in to comment.