From def6a019d64c52c0793777b8ea47db55efeb4604 Mon Sep 17 00:00:00 2001 From: jesopo Date: Fri, 24 Jan 2020 15:35:05 +0000 Subject: [PATCH] don't args[0] for rchannel when [], better rchannel error --- src/core_modules/command_spec.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core_modules/command_spec.py b/src/core_modules/command_spec.py index 405d346b..9a3c7943 100644 --- a/src/core_modules/command_spec.py +++ b/src/core_modules/command_spec.py @@ -17,11 +17,13 @@ class Module(ModuleManager.BaseModule): elif type == "rchannel": if channel: chunk = channel - else: + elif args: n = 1 if args[0] in server.channels: chunk = server.channels.get(args[0]) - error = "No such channel" + error = "No such channel" + else: + error = "No channel provided" elif type == "channel" and args: if args[0] in server.channels: chunk = server.channels.get(args[0])