Make connection notifications configurable
This commit is contained in:
parent
f53cb060d0
commit
5d5b5d4d47
|
@ -193,6 +193,7 @@ class IRCBot(IRCClient):
|
|||
def signedOn(self):
|
||||
self.connected = True
|
||||
log("signed on: %s" % self.name)
|
||||
if config["ConnectionNotifications"]:
|
||||
helper.sendMaster("SIGNON: %s" % self.name)
|
||||
if self.authtype == "ns":
|
||||
self.msg(self.authentity, "IDENTIFY %s" % self.nspass)
|
||||
|
@ -272,6 +273,7 @@ class IRCBotFactory(ReconnectingClientFactory):
|
|||
error = reason.getErrorMessage()
|
||||
log("%s: connection lost: %s" % (self.name, error))
|
||||
helper.sendAll("%s: connection lost: %s" % (self.name, error))
|
||||
if config["ConnectionNotifications"]:
|
||||
helper.sendMaster("CONNLOST %s: %s" % (self.name, error))
|
||||
self.retry(connector)
|
||||
#ReconnectingClientFactory.clientConnectionLost(self, connector, reason)
|
||||
|
@ -283,6 +285,7 @@ class IRCBotFactory(ReconnectingClientFactory):
|
|||
error = reason.getErrorMessage()
|
||||
log("%s: connection failed: %s" % (self.name, error))
|
||||
helper.sendAll("%s: connection failed: %s" % (self.name, error))
|
||||
if config["ConnectionNotifications"]:
|
||||
helper.sendMaster("CONNFAIL %s: %s" % (self.name, error))
|
||||
self.retry(connector)
|
||||
#ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
|
||||
|
|
Loading…
Reference in New Issue