mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
Fixed bug #853654.
This commit is contained in:
parent
5a6b5329f1
commit
f26115bb9b
@ -370,14 +370,14 @@ class ChannelDB(plugins.ChannelDBHandler,
|
||||
if ('--user', '') in optlist:
|
||||
table = 'user_stats'
|
||||
criterion = 'user_id=%s'
|
||||
name = ircdb.users.getUserId(name)
|
||||
if not ircdb.users.hasUser(name):
|
||||
try:
|
||||
name = ircdb.users.getUserId(name)
|
||||
except KeyError:
|
||||
try:
|
||||
hostmask = irc.state.nickToHostmask(name)
|
||||
name = ircdb.users.getUser(hostmask).name
|
||||
name = ircdb.users.getUserId(hostmask)
|
||||
except KeyError:
|
||||
irc.error(msg, conf.replyNoUser)
|
||||
return
|
||||
else:
|
||||
table = 'nick_seen'
|
||||
criterion = 'normalized=%s'
|
||||
|
@ -90,6 +90,9 @@ if sqlite is not None:
|
||||
self.assertRegexp('seen --user %s' % self.nick,
|
||||
'^%s was last seen' % self.nick)
|
||||
|
||||
def testSeenNoUser(self):
|
||||
self.assertNotRegexp('seen --user alsdkfjalsdfkj', 'KeyError')
|
||||
|
||||
def testWordStatsNoArgs(self):
|
||||
self.assertResponse('wordstats', 'I am not currently keeping any '
|
||||
'word stats.')
|
||||
|
Loading…
Reference in New Issue
Block a user