bitbot-3.11-fork/modules/nickserv.py

14 lines
341 B
Python
Raw Normal View History

2016-03-29 11:56:58 +00:00
class Module(object):
def __init__(self, bot):
bot.events.on("received").on("numeric").on("001"
).hook(self.on_connect)
def on_connect(self, event):
nickserv_password = event["server"].get_setting(
"nickserv-password")
2016-03-29 11:56:58 +00:00
if nickserv_password:
event["server"].send_message("nickserv",
"identify %s" % nickserv_password)