Add config option for NickServ password.
This commit is contained in:
Родитель
02cbaa5127
Коммит
a23e9afada
|
@ -71,6 +71,11 @@ class Bot(irc.client.SimpleIRCClient):
|
|||
def on_welcome(self, connection, event):
|
||||
# TODO: Log errors when joining channels.
|
||||
logging.info('Connected!')
|
||||
|
||||
if config.NICKSERV_PASSWORD:
|
||||
self.connection.privmsg('NickServ',
|
||||
'identify %s' % config.NICKSERV_PASSWORD)
|
||||
|
||||
for channel in config.IRC_CHANNELS:
|
||||
channel_name, _, key = channel.partition(':')
|
||||
connection.join(channel_name, key)
|
||||
|
|
|
@ -38,3 +38,6 @@ REDIS_URL = os.environ.get('REDIS_URL', 'http://localhost:6379')
|
|||
|
||||
# How often, in seconds, to query Bugzilla.
|
||||
STATS_REFRESH_PERIOD = int(os.environ.get('STATS_REFRESH_PERIOD', 5*60))
|
||||
|
||||
# Password to send to NickServ upon connection.
|
||||
NICKSERV_PASSWORD = os.environ.get('NICKSERV_PASSWORD')
|
||||
|
|
Загрузка…
Ссылка в новой задаче