mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 12:42:34 +01:00
Removed trailing periods in larts and praises.
This commit is contained in:
parent
8070401018
commit
83995296b7
@ -402,6 +402,7 @@ class FunDB(callbacks.Privmsg, configurable.Mixin, plugins.ChannelDBHandler):
|
||||
except ValueError:
|
||||
nick = ' '.join([id, nick]).strip()
|
||||
id = 0
|
||||
nick = nick.rstrip('.')
|
||||
if not nick:
|
||||
raise callbacks.ArgumentError
|
||||
if nick == irc.nick:
|
||||
@ -457,6 +458,7 @@ class FunDB(callbacks.Privmsg, configurable.Mixin, plugins.ChannelDBHandler):
|
||||
except ValueError:
|
||||
nick = ' '.join([id, nick]).strip()
|
||||
id = 0
|
||||
nick = nick.rstrip('.')
|
||||
if not nick:
|
||||
raise callbacks.ArgumentError
|
||||
try:
|
||||
|
@ -86,6 +86,11 @@ if sqlite is not None:
|
||||
self.assertRegexp('num lart', 'currently 0')
|
||||
self.assertError('lart jemfinch')
|
||||
|
||||
def testLartAndPraiseRemoveTrailingPeriods(self):
|
||||
for s in ['lart', 'praise']:
|
||||
self.assertNotError('add %s $who foo!' % s)
|
||||
self.assertAction('%s bar.' % s, 'bar foo!')
|
||||
|
||||
def testMyMeReplacement(self):
|
||||
self.assertNotError('add lart jabs $who')
|
||||
self.assertNotError('add praise pets $who')
|
||||
|
Loading…
Reference in New Issue
Block a user