bitbot-3.11-fork/modules/nickserv.py

14 lines
589 B
Python
Raw Normal View History

import base64
from src import EventManager, ModuleManager, utils
@utils.export("serverset", {"setting": "nickserv-password",
"help": "Set the nickserv password for this server"})
class Module(ModuleManager.BaseModule):
@utils.hook("received.001", priority=EventManager.PRIORITY_URGENT)
def on_connect(self, event):
2018-10-03 15:00:07 +00:00
nickserv_password = event["server"].get_setting("nickserv-password")
2018-07-15 22:56:06 +00:00
if nickserv_password:
event["server"].attempted_auth = True
event["server"].send_message("nickserv",
"identify %s" % nickserv_password)