From 889e99cec6b3fb30df7ff6049e13b8dd1e5384b6 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Thu, 16 Oct 2003 10:43:35 +0000 Subject: [PATCH] Fixed an invalid irc.error in the part command. --- src/AdminCommands.py | 2 +- test/test_AdminCommands.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/AdminCommands.py b/src/AdminCommands.py index 59be29846..9c583f838 100755 --- a/src/AdminCommands.py +++ b/src/AdminCommands.py @@ -89,7 +89,7 @@ class AdminCommands(privmsgs.CapabilityCheckingPrivmsg): args.append(msg.args[0]) for arg in args: if arg not in irc.state.channels: - irc.error('I\'m not currently in %s' % arg) + irc.error(msg, 'I\'m not currently in %s' % arg) return irc.queueMsg(ircmsgs.parts(args, msg.nick)) diff --git a/test/test_AdminCommands.py b/test/test_AdminCommands.py index b856cfa5e..2fd54aca2 100644 --- a/test/test_AdminCommands.py +++ b/test/test_AdminCommands.py @@ -77,6 +77,7 @@ class AdminCommandsTestCase(PluginTestCase, PluginDocumentation): def testPart(self): self.assertError('part #foo') + self.assertRegexp('part #foo', 'currently') _ = self.getMsg('join #foo') # get the JOIN. _ = self.getMsg(' ') # get the WHO. self.assertError('part #foo #bar')