mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 03:33:11 +01:00
Make sure seen doesn't warp the case of the nick given.
This commit is contained in:
parent
f453d10e9a
commit
57b038ea63
@ -390,6 +390,7 @@ class ChannelDB(plugins.ChannelDBHandler,
|
||||
cursor = db.cursor()
|
||||
(optlist, rest) = getopt.getopt(args, '', ['user'])
|
||||
name = privmsgs.getArgs(rest)
|
||||
originalName = name
|
||||
if ('--user', '') in optlist:
|
||||
table = 'user_stats'
|
||||
criterion = 'user_id=%s'
|
||||
@ -415,7 +416,7 @@ class ChannelDB(plugins.ChannelDBHandler,
|
||||
if isinstance(name, int):
|
||||
name = ircdb.users.getUser(int(name)).name
|
||||
s = '%s was last seen here %s ago saying: %s' % \
|
||||
(name, utils.timeElapsed(time.time() - seen), m)
|
||||
(originalName, utils.timeElapsed(time.time() - seen), m)
|
||||
irc.reply(s)
|
||||
|
||||
def stats(self, irc, msg, args):
|
||||
|
@ -86,7 +86,8 @@ if sqlite is not None:
|
||||
def testSeen(self):
|
||||
self.assertNotError('list')
|
||||
self.assertNotError('seen %s' % self.nick)
|
||||
self.assertNotError('seen %s' % self.nick.upper())
|
||||
m = self.assertNotError('seen %s' % self.nick.upper())
|
||||
self.failUnless(self.nick.upper() in m.args[1])
|
||||
self.assertRegexp('seen --user %s' % self.nick,
|
||||
'^%s was last seen' % self.nick)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user