[ChOp] Fix error messages for !op and !deop when no args are given
This commit is contained in:
parent
0af1de2c3e
commit
7eda2e1c0d
4
chop.py
4
chop.py
@ -161,7 +161,7 @@ def op(phenny, input):
|
||||
if not input.sender.startswith('#'): return
|
||||
# Can only be done in a channel by an admin
|
||||
arg = input.group(2)
|
||||
if not arg: phenny.write(['MODE', input.sender, '+o', input.nick], "")
|
||||
if not arg: return phenny.write(['MODE', input.sender, '+o', input.nick], "")
|
||||
arg = arg.split(" ")
|
||||
for va in arg:
|
||||
phenny.write(['MODE', input.sender, '+o', va], "")
|
||||
@ -173,7 +173,7 @@ def deop(phenny, input):
|
||||
if not input.sender.startswith('#'): return
|
||||
# Can only be done in a channel by an admin
|
||||
arg = input.group(2)
|
||||
if not arg: phenny.write(['MODE', input.sender, '-o', input.nick], "")
|
||||
if not arg: return phenny.write(['MODE', input.sender, '-o', input.nick], "")
|
||||
arg = arg.split(" ")
|
||||
for va in arg:
|
||||
phenny.write(['MODE', input.sender, '-o', va], "")
|
||||
|
Loading…
x
Reference in New Issue
Block a user