fix privateonly/channelonly - True or None, not True or False
This commit is contained in:
parent
d95f5362bf
commit
7241027ff7
1 changed files with 6 additions and 4 deletions
|
@ -89,13 +89,15 @@ class Module(ModuleManager.BaseModule):
|
||||||
value = server.get_user(args[0], create=True)
|
value = server.get_user(args[0], create=True)
|
||||||
n = 1
|
n = 1
|
||||||
elif argument_type.type == "channelonly":
|
elif argument_type.type == "channelonly":
|
||||||
value = not channel == None
|
if channel:
|
||||||
|
value = True
|
||||||
n = 0
|
n = 0
|
||||||
error = "Command not valid in private message"
|
error = "Command not valid in PM"
|
||||||
elif argument_type.type == "privateonly":
|
elif argument_type.type == "privateonly":
|
||||||
value = channel == None
|
if not channel:
|
||||||
|
value = True
|
||||||
n = 0
|
n = 0
|
||||||
error = "Command not valid in private message"
|
error = "Command not valid in-channel"
|
||||||
|
|
||||||
options.append([argument_type, value, n, error])
|
options.append([argument_type, value, n, error])
|
||||||
return options
|
return options
|
||||||
|
|
Loading…
Reference in a new issue