Fix for bug with outfilter.

This commit is contained in:
Jeremy Fincher 2004-10-14 18:13:30 +00:00
parent dcff006235
commit 70f9e4c7b0
2 changed files with 7 additions and 3 deletions

View File

@ -607,12 +607,13 @@ class Filter(callbacks.Privmsg):
irc.reply(out.getvalue())
spellit = wrap(spellit, ['text'])
def gnu(self, irc, msg, args):
def gnu(self, irc, msg, args, text):
"""<text>
Returns <text> as RMS would say it.
Returns <text> as GNU/RMS would say it.
"""
irc.reply(' '.join(['GNU/' + s for s in args]))
irc.reply(' '.join(['GNU/' + s for s in text.split()]))
gnu = wrap(gnu, ['text'])
Class = Filter

View File

@ -153,5 +153,8 @@ class FilterTest(ChannelPluginTestCase, PluginDocumentation):
def testGnu(self):
self.assertResponse('gnu foo bar baz', 'GNU/foo GNU/bar GNU/baz')
self.assertNotError('outfilter gnu')
self.assertResponse('echo foo bar baz', 'GNU/foo GNU/bar GNU/baz')
self.assertNotError('outfilter')
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78: