Fixed an invalid irc.error in the part command.

This commit is contained in:
Jeremy Fincher 2003-10-16 10:43:35 +00:00
parent 2ddb080a73
commit 889e99cec6
2 changed files with 2 additions and 1 deletions

View File

@ -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))

View File

@ -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')