ptgbot should still ask for identify-map cap
In the recent SSL/SASL introduction, we removed the on_welcome() and on_cap() functions which were thought to be taken care of by the introduced mixins. Turns out it was not the case and the bot needs the identify-msg cap in order to function, so we should restore that code. Change-Id: I11f94ddc2be7e3ff6592dd2c2e5fbfb43f6309f7
This commit is contained in:
parent
fad68b2b48
commit
668bbf43f1
|
@ -63,6 +63,18 @@ class PTGBot(SASL, SSL, irc.bot.SingleServerIRCBot):
|
|||
self.identify_msg_cap = False
|
||||
self.data = db
|
||||
|
||||
def on_welcome(self, c, e):
|
||||
self.identify_msg_cap = False
|
||||
self.log.debug("Requesting identify-msg capability")
|
||||
c.cap('REQ', 'identify-msg')
|
||||
c.cap('END')
|
||||
|
||||
def on_cap(self, c, e):
|
||||
self.log.debug("Received cap response %s" % repr(e.arguments))
|
||||
if e.arguments[0] == 'ACK' and 'identify-msg' in e.arguments[1]:
|
||||
self.log.debug("identify-msg cap acked")
|
||||
self.identify_msg_cap = True
|
||||
|
||||
def usage(self, channel):
|
||||
self.send(channel, "Format is '#TRACK COMMAND [PARAMETERS]'")
|
||||
self.send(channel, "See doc at: " + DOC_URL)
|
||||
|
|
Loading…
Reference in New Issue