don't args[0] for rchannel when [], better rchannel error

This commit is contained in:
jesopo 2020-01-24 15:35:05 +00:00
parent 47cb5eaab8
commit def6a019d6

View file

@ -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"
else:
error = "No channel provided"
elif type == "channel" and args:
if args[0] in server.channels:
chunk = server.channels.get(args[0])