From 6ebc226e006f92a3050cad09730dc9f8f5beb007 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Tue, 10 Feb 2004 00:53:01 +0000 Subject: [PATCH] Reject invalid join commands outright. --- src/Admin.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Admin.py b/src/Admin.py index debca5332..b1b9f9c7c 100755 --- a/src/Admin.py +++ b/src/Admin.py @@ -137,6 +137,8 @@ class Admin(privmsgs.CapabilityCheckingPrivmsg): channel name via a comma. I.e., if you need to join both #a and #b, and #a requires a key of 'aRocks', then you'd call 'join #a,aRocks #b' """ + if not args: + raise callbacks.ArgumentError keys = [] channels = [] for channel in args: @@ -191,7 +193,7 @@ class Admin(privmsgs.CapabilityCheckingPrivmsg): you give it. """ if not args: - args.append(msg.args[0]) + args = [msg.args[0]] for arg in args: if arg not in irc.state.channels: irc.error('I\'m not currently in %s' % arg)