mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-15 15:09:23 +01:00
Merge pull request #809 from nyuszika7h/irc-caps
src/irclib.py: set caps in Irc.__init__
This commit is contained in:
commit
2233d93711
@ -654,6 +654,7 @@ class Irc(IrcCommandDispatcher):
|
||||
self._setNonResettingVariables()
|
||||
self._queueConnectMessages()
|
||||
self.startedSync = ircutils.IrcDict()
|
||||
self.caps = set(['account-notify', 'extended-join'])
|
||||
|
||||
def isChannel(self, s):
|
||||
"""Helper function to check whether a given string is a channel on
|
||||
@ -969,17 +970,15 @@ class Irc(IrcCommandDispatcher):
|
||||
self.queueMsg(ircmsgs.IrcMsg(command='AUTHENTICATE', args=(authstring,)))
|
||||
|
||||
def doCap(self, msg):
|
||||
caps = ['account-notify', 'extended-join']
|
||||
|
||||
if self.sasl_password:
|
||||
if self.sasl_username:
|
||||
caps.append('sasl')
|
||||
self.caps.append('sasl')
|
||||
else:
|
||||
log.warning('%s: SASL username is not set, unable to '
|
||||
'identify.', self.network)
|
||||
|
||||
for cap in msg.args[2].split(' '):
|
||||
if msg.args[1] == 'LS' and cap in caps:
|
||||
if msg.args[1] == 'LS' and cap in self.caps:
|
||||
log.debug('%s: Requesting capability %r', self.network, cap)
|
||||
self.queueMsg(ircmsgs.IrcMsg(command='CAP', args=('REQ', cap)))
|
||||
elif msg.args[1] == 'ACK':
|
||||
|
Loading…
Reference in New Issue
Block a user