bitbot-3.11-fork/modules/kick-rejoin.py

12 lines
408 B
Python
Raw Normal View History

2019-07-11 20:28:05 +00:00
#--depends-on config
from src import ModuleManager, utils
@utils.export("serverset", utils.BoolSetting("kick-rejoin",
"Whether or not I should rejoin channels I get kicked from"))
class Module(ModuleManager.BaseModule):
@utils.hook("self.kick")
def on_kick(self, event):
if event["server"].get_setting("kick-rejoin", False):
event["server"].send_join(event["channel"].name)