3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-24 11:42:51 +01:00

Irc: oops, wrapModes() needs to be a classmethod

This commit is contained in:
James Lu 2017-01-02 12:15:44 -08:00
parent 5843eebba2
commit d1d3c3ef15

View File

@ -858,8 +858,8 @@ class Irc():
modelist += ' %s' % ' '.join(args)
return modelist
@staticmethod
def wrapModes(modes, limit):
@classmethod
def wrapModes(cls, modes, limit):
"""
Takes a list of modes and wraps it across multiple lines.
"""
@ -916,7 +916,7 @@ class Irc():
else:
# Otherwise, create a new message by joining the previous queue.
# Then, add our current mode.
strings.append(self.joinModes(queued_modes))
strings.append(cls.joinModes(queued_modes))
queued_modes.clear()
log.debug('wrapModes: cleared queue (length %s) and now adding %s', limit, str(next_mode))
@ -924,7 +924,7 @@ class Irc():
total_length = next_length
else:
# Everything fit in one line, so just use that.
strings.append(self.joinModes(queued_modes))
strings.append(cls.joinModes(queued_modes))
log.debug('wrapModes: returning %s for %s', strings, orig_modes)
return strings