Commits

Anonymous committed 7873211

Add NickServ registration

Comments (0)

Files changed (2)

pmxbot/__init__.py

 	server_port = 6667,
 	use_ssl = False,
 	password = None,
+	nickserv_password = None,
 	silent_bot = False,
 	log_channels = [],
 	other_channels = [],
 	def on_welcome(self, connection, event):
 		# save the connection object so .out has something to call
 		self._conn = connection
+		if pmxbot.config.nickserv_password:
+			connection.privmsg('NickServ', 'identify %s' %
+				pmxbot.config.nickserv_password)
 
 		# join channels
 		for channel in self._channels: