Implement query notifications and recognise ZNC's messages
This commit is contained in:
@@ -220,7 +220,7 @@ class IRCBot(IRCClient):
|
||||
def signedOn(self):
|
||||
self.connected = True
|
||||
log("signed on: %s" % self.name)
|
||||
if main.config["ConnectionNotifications"]:
|
||||
if main.config["Notifications"]["Connection"]:
|
||||
keyword.sendMaster("SIGNON: %s" % self.name)
|
||||
if self.authtype == "ns":
|
||||
self.msg(self.authentity, "IDENTIFY %s" % self.nspass)
|
||||
@@ -316,7 +316,7 @@ class IRCBotFactory(ReconnectingClientFactory):
|
||||
error = reason.getErrorMessage()
|
||||
log("%s: connection lost: %s" % (self.name, error))
|
||||
sendAll("%s: connection lost: %s" % (self.name, error))
|
||||
if main.config["ConnectionNotifications"]:
|
||||
if main.config["Notifications"]["Connection"]:
|
||||
keyword.sendMaster("CONNLOST %s: %s" % (self.name, error))
|
||||
self.retry(connector)
|
||||
#ReconnectingClientFactory.clientConnectionLost(self, connector, reason)
|
||||
@@ -328,7 +328,7 @@ class IRCBotFactory(ReconnectingClientFactory):
|
||||
error = reason.getErrorMessage()
|
||||
log("%s: connection failed: %s" % (self.name, error))
|
||||
sendAll("%s: connection failed: %s" % (self.name, error))
|
||||
if main.config["ConnectionNotifications"]:
|
||||
if main.config["Notifications"]["Connection"]:
|
||||
keyword.sendMaster("CONNFAIL %s: %s" % (self.name, error))
|
||||
self.retry(connector)
|
||||
#ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
|
||||
|
||||
Reference in New Issue
Block a user