mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 20:52:42 +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:
|
except ValueError:
|
||||||
nick = ' '.join([id, nick]).strip()
|
nick = ' '.join([id, nick]).strip()
|
||||||
id = 0
|
id = 0
|
||||||
|
nick = nick.rstrip('.')
|
||||||
if not nick:
|
if not nick:
|
||||||
raise callbacks.ArgumentError
|
raise callbacks.ArgumentError
|
||||||
if nick == irc.nick:
|
if nick == irc.nick:
|
||||||
@ -457,6 +458,7 @@ class FunDB(callbacks.Privmsg, configurable.Mixin, plugins.ChannelDBHandler):
|
|||||||
except ValueError:
|
except ValueError:
|
||||||
nick = ' '.join([id, nick]).strip()
|
nick = ' '.join([id, nick]).strip()
|
||||||
id = 0
|
id = 0
|
||||||
|
nick = nick.rstrip('.')
|
||||||
if not nick:
|
if not nick:
|
||||||
raise callbacks.ArgumentError
|
raise callbacks.ArgumentError
|
||||||
try:
|
try:
|
||||||
|
@ -86,6 +86,11 @@ if sqlite is not None:
|
|||||||
self.assertRegexp('num lart', 'currently 0')
|
self.assertRegexp('num lart', 'currently 0')
|
||||||
self.assertError('lart jemfinch')
|
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):
|
def testMyMeReplacement(self):
|
||||||
self.assertNotError('add lart jabs $who')
|
self.assertNotError('add lart jabs $who')
|
||||||
self.assertNotError('add praise pets $who')
|
self.assertNotError('add praise pets $who')
|
||||||
|
Loading…
Reference in New Issue
Block a user