2019-05-25 20:40:06 +00:00
|
|
|
#--depends-on config
|
|
|
|
|
2017-07-12 09:00:27 +00:00
|
|
|
import base64
|
2018-10-03 12:22:37 +00:00
|
|
|
from src import EventManager, ModuleManager, utils
|
2016-05-17 13:52:07 +00:00
|
|
|
|
2019-06-28 22:16:05 +00:00
|
|
|
@utils.export("serverset", utils.Setting("nickserv-password",
|
|
|
|
"Set the nickserv password for this server", example="hunter2"))
|
2018-09-27 11:08:07 +00:00
|
|
|
class Module(ModuleManager.BaseModule):
|
2019-02-16 15:53:14 +00:00
|
|
|
@utils.hook("received.001", priority=EventManager.PRIORITY_URGENT)
|
2016-05-17 13:52:07 +00:00
|
|
|
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:
|
2016-05-17 13:52:07 +00:00
|
|
|
event["server"].send_message("nickserv",
|
|
|
|
"identify %s" % nickserv_password)
|