mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 03:33:11 +01:00
Various sorted updates (pun intended, punks :))
This commit is contained in:
parent
ed8df0a998
commit
d3d43f8a0c
@ -435,8 +435,7 @@ class Channel(callbacks.Privmsg):
|
||||
s = 'I\'m not currently ignoring any hostmasks in %r' % channel
|
||||
irc.reply(s)
|
||||
else:
|
||||
L = c.ignores[:]
|
||||
L.sort()
|
||||
L = sorted(c.ignores)
|
||||
irc.reply(utils.commaAndify(imap(repr, L)))
|
||||
ignores = privmsgs.checkChannelCapability(ignores, 'op')
|
||||
|
||||
@ -542,8 +541,7 @@ class Channel(callbacks.Privmsg):
|
||||
"""
|
||||
channel = privmsgs.getChannel(msg, args)
|
||||
c = ircdb.channels.getChannel(channel)
|
||||
L = list(c.capabilities)
|
||||
L.sort()
|
||||
L = sorted(c.capabilities)
|
||||
irc.reply('[%s]' % '; '.join(L))
|
||||
|
||||
def lobotomies(self, irc, msg, args):
|
||||
|
@ -168,14 +168,6 @@ def rsplit(s, sep=None, maxsplit=-1):
|
||||
L.reverse()
|
||||
return [s[::-1] for s in L]
|
||||
|
||||
def sorted(iterable, cmp=None, key=None, reverse=False):
|
||||
L = list(iterable)
|
||||
## if key is None:
|
||||
## L.sort(cmp)
|
||||
## else:
|
||||
## # Oops, we don't have sortBy. Let's come back to this.utils.
|
||||
## utils.sortBy(key
|
||||
|
||||
import operator
|
||||
def itemgetter(i):
|
||||
return lambda x: x[i]
|
||||
|
Loading…
Reference in New Issue
Block a user