don't args[0] for rchannel when [], better rchannel error
This commit is contained in:
parent
47cb5eaab8
commit
def6a019d6
1 changed files with 4 additions and 2 deletions
|
@ -17,11 +17,13 @@ class Module(ModuleManager.BaseModule):
|
||||||
elif type == "rchannel":
|
elif type == "rchannel":
|
||||||
if channel:
|
if channel:
|
||||||
chunk = channel
|
chunk = channel
|
||||||
else:
|
elif args:
|
||||||
n = 1
|
n = 1
|
||||||
if args[0] in server.channels:
|
if args[0] in server.channels:
|
||||||
chunk = server.channels.get(args[0])
|
chunk = server.channels.get(args[0])
|
||||||
error = "No such channel"
|
error = "No such channel"
|
||||||
|
else:
|
||||||
|
error = "No channel provided"
|
||||||
elif type == "channel" and args:
|
elif type == "channel" and args:
|
||||||
if args[0] in server.channels:
|
if args[0] in server.channels:
|
||||||
chunk = server.channels.get(args[0])
|
chunk = server.channels.get(args[0])
|
||||||
|
|
Loading…
Reference in a new issue