bitbot-3.11-fork/modules/accept_invite.py

10 lines
285 B
Python
Raw Normal View History

2016-03-29 11:56:58 +00:00
class Module(object):
def __init__(self, bot, events):
events.on("received").on("invite").hook(self.on_invite)
2016-03-29 11:56:58 +00:00
def on_invite(self, event):
if event["server"].get_setting("accept-invites", True):
event["server"].send_join(event["target_channel"])