add kick-rejoin.py
This commit is contained in:
parent
d3f09c5618
commit
fa429a4c28
1 changed files with 11 additions and 0 deletions
11
modules/kick-rejoin.py
Normal file
11
modules/kick-rejoin.py
Normal 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)
|
Loading…
Reference in a new issue