mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 20:59:27 +01:00
plugins/Seen: Use an IrcSet to gather the seen nicks instead of a list. This makes commands like '@seen *amessan' work as expected.
This commit is contained in:
parent
07be8cd2c0
commit
987c696f68
@ -64,7 +64,7 @@ class SeenDB(plugins.ChannelUserDB):
|
||||
self[channel, '<last>'] = (seen, saying)
|
||||
|
||||
def seenWildcard(self, channel, nick):
|
||||
nicks = []
|
||||
nicks = ircutils.IrcSet()
|
||||
nickRe = re.compile('.*'.join(nick.split('*')), re.I)
|
||||
for (searchChan, searchNick) in self.keys():
|
||||
#print 'chan: %s ... nick: %s' % (searchChan, searchNick)
|
||||
@ -78,7 +78,7 @@ class SeenDB(plugins.ChannelUserDB):
|
||||
s = nickRe.match(searchNick).group()
|
||||
except AttributeError:
|
||||
continue
|
||||
nicks.append(s)
|
||||
nicks.add(s)
|
||||
L = [[nick, self.seen(channel, nick)] for nick in nicks]
|
||||
def negativeTime(x):
|
||||
return -x[1][0]
|
||||
|
Loading…
Reference in New Issue
Block a user