mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-30 22:24:20 +01:00
Fix for bug #851254.
This commit is contained in:
parent
e15d15f794
commit
72f93610b1
@ -1,3 +1,5 @@
|
|||||||
|
* Fixed bug #851254, Factoids.whatis didn't work on numeric keys.
|
||||||
|
|
||||||
* Added the ability to turn on/off the showing of ids in FunDB
|
* Added the ability to turn on/off the showing of ids in FunDB
|
||||||
excuse/insult/praise/lart.
|
excuse/insult/praise/lart.
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ class Factoids(plugins.ChannelDBHandler, callbacks.Privmsg):
|
|||||||
necessary if the message isn't sent in the channel itself.
|
necessary if the message isn't sent in the channel itself.
|
||||||
"""
|
"""
|
||||||
channel = privmsgs.getChannel(msg, args)
|
channel = privmsgs.getChannel(msg, args)
|
||||||
if args[-1].isdigit():
|
if len(args) > 1 and args[-1].isdigit():
|
||||||
number = args.pop()
|
number = args.pop()
|
||||||
else:
|
else:
|
||||||
number = ''
|
number = ''
|
||||||
|
@ -105,6 +105,9 @@ if sqlite is not None:
|
|||||||
self.assertRegexp('search jemfinch',
|
self.assertRegexp('search jemfinch',
|
||||||
'my primary author')
|
'my primary author')
|
||||||
|
|
||||||
|
def testWhatisOnNumbers(self):
|
||||||
|
self.assertNotError('learn 911 as emergency number')
|
||||||
|
self.assertRegexp('whatis 911', 'emergency number')
|
||||||
|
|
||||||
def testNotZeroIndexed(self):
|
def testNotZeroIndexed(self):
|
||||||
self.assertNotError('learn foo as bar')
|
self.assertNotError('learn foo as bar')
|
||||||
|
Loading…
Reference in New Issue
Block a user