Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added auto-accept invite feature and config option. #557

Merged
merged 2 commits into from
Jan 11, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions willie/modules/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,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'.*')
Expand Down