mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-30 06:49:24 +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)
|
self[channel, '<last>'] = (seen, saying)
|
||||||
|
|
||||||
def seenWildcard(self, channel, nick):
|
def seenWildcard(self, channel, nick):
|
||||||
nicks = []
|
nicks = ircutils.IrcSet()
|
||||||
nickRe = re.compile('.*'.join(nick.split('*')), re.I)
|
nickRe = re.compile('.*'.join(nick.split('*')), re.I)
|
||||||
for (searchChan, searchNick) in self.keys():
|
for (searchChan, searchNick) in self.keys():
|
||||||
#print 'chan: %s ... nick: %s' % (searchChan, searchNick)
|
#print 'chan: %s ... nick: %s' % (searchChan, searchNick)
|
||||||
@ -78,7 +78,7 @@ class SeenDB(plugins.ChannelUserDB):
|
|||||||
s = nickRe.match(searchNick).group()
|
s = nickRe.match(searchNick).group()
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
continue
|
continue
|
||||||
nicks.append(s)
|
nicks.add(s)
|
||||||
L = [[nick, self.seen(channel, nick)] for nick in nicks]
|
L = [[nick, self.seen(channel, nick)] for nick in nicks]
|
||||||
def negativeTime(x):
|
def negativeTime(x):
|
||||||
return -x[1][0]
|
return -x[1][0]
|
||||||
|
Loading…
Reference in New Issue
Block a user