add kick-rejoin.py

This commit is contained in:
jesopo 2019-07-11 21:28:05 +01:00
parent d3f09c5618
commit fa429a4c28

11
modules/kick-rejoin.py Normal file
View file

@ -0,0 +1,11 @@
#--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)