mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 20:52:42 +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
|
s = 'I\'m not currently ignoring any hostmasks in %r' % channel
|
||||||
irc.reply(s)
|
irc.reply(s)
|
||||||
else:
|
else:
|
||||||
L = c.ignores[:]
|
L = sorted(c.ignores)
|
||||||
L.sort()
|
|
||||||
irc.reply(utils.commaAndify(imap(repr, L)))
|
irc.reply(utils.commaAndify(imap(repr, L)))
|
||||||
ignores = privmsgs.checkChannelCapability(ignores, 'op')
|
ignores = privmsgs.checkChannelCapability(ignores, 'op')
|
||||||
|
|
||||||
@ -542,8 +541,7 @@ class Channel(callbacks.Privmsg):
|
|||||||
"""
|
"""
|
||||||
channel = privmsgs.getChannel(msg, args)
|
channel = privmsgs.getChannel(msg, args)
|
||||||
c = ircdb.channels.getChannel(channel)
|
c = ircdb.channels.getChannel(channel)
|
||||||
L = list(c.capabilities)
|
L = sorted(c.capabilities)
|
||||||
L.sort()
|
|
||||||
irc.reply('[%s]' % '; '.join(L))
|
irc.reply('[%s]' % '; '.join(L))
|
||||||
|
|
||||||
def lobotomies(self, irc, msg, args):
|
def lobotomies(self, irc, msg, args):
|
||||||
|
@ -168,14 +168,6 @@ def rsplit(s, sep=None, maxsplit=-1):
|
|||||||
L.reverse()
|
L.reverse()
|
||||||
return [s[::-1] for s in L]
|
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
|
import operator
|
||||||
def itemgetter(i):
|
def itemgetter(i):
|
||||||
return lambda x: x[i]
|
return lambda x: x[i]
|
||||||
|
Loading…
Reference in New Issue
Block a user