diff --git a/plugins/Utilities.py b/plugins/Utilities.py index 781c308b5..f35246b89 100644 --- a/plugins/Utilities.py +++ b/plugins/Utilities.py @@ -130,6 +130,7 @@ class Utilities(callbacks.Privmsg): total = 0 for arg in args: total += len(arg) + total += len(args)-1 # spaces between the arguments. irc.reply(msg, str(total)) def repr(self, irc, msg, args): diff --git a/test/test_Utilities.py b/test/test_Utilities.py index 88dd1f2a6..c7562a45b 100644 --- a/test/test_Utilities.py +++ b/test/test_Utilities.py @@ -55,6 +55,7 @@ class UtilitiesTestCase(PluginTestCase): def testStrlen(self): self.assertResponse('strlen %s' % ('s'*10), '10') + self.assertResponse('strlen a b', '3') def testRepr(self): self.assertResponse('repr foo bar baz', '"foo bar baz"')