blob: 031c81d9aeea535424bc62e1ca7188eb64b31c45 (
about) (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
import base64
import EventManager
class Module(object):
def __init__(self, bot, events, exports):
events.on("received.numeric.001").hook(self.on_connect,
priority=EventManager.PRIORITY_URGENT)
exports.add("serverset", {"setting": "nickserv-password",
"help": "Set the nickserv password for this server"})
def on_connect(self, event):
nickserv_password = event["server"].get_setting(
"nickserv-password")
if nickserv_password:
event["server"].attempted_auth = True
event["server"].send_message("nickserv",
"identify %s" % nickserv_password)
|