prevent odd behaviour with CAP when settings are wrong

This commit is contained in:
Nicolas Coevoet 2013-10-19 08:50:41 +02:00
parent 4379866dcd
commit f0259c5b37

View File

@ -1817,10 +1817,9 @@ class ChanTracker(callbacks.Plugin,plugins.ChannelDBHandler):
# ['account-notify','extended-join'] # ['account-notify','extended-join']
# targeted caps # targeted caps
CAPS = self.registryValue('caps') CAPS = self.registryValue('caps')
CAPS = ''.join(CAPS)
CAPS = CAPS.split(',')
for cap in CAPS: for cap in CAPS:
if cap in i.caps['LS'] and not cap in i.caps['LIST']: # len(cap) == 1 prevents weired behaviour with CommaSeparatedListOfStrings
if len(cap) != 1 and cap in i.caps['LS'] and not cap in i.caps['LIST']:
r.append(cap) r.append(cap)
if len(r): if len(r):
# apply missed caps # apply missed caps