better "!user" spec error

This commit is contained in:
jesopo 2020-01-24 16:42:23 +00:00
parent 9ddcad73ae
commit e16831cc83

View file

@ -58,10 +58,13 @@ class Module(ModuleManager.BaseModule):
else: else:
chunk = user chunk = user
error = "No such user" error = "No such user"
elif spec_type == "user" and args: elif spec_type == "user":
chunk = server.get_user(args[0], create=False) if args:
n = 1 chunk = server.get_user(args[0], create=False)
error = "No such user" n = 1
error = "No such user"
else:
error = "No user provided"
elif spec_type == "ouser" and args: elif spec_type == "ouser" and args:
if server.has_user_id(args[0]): if server.has_user_id(args[0]):
chunk = server.get_user(args[0]) chunk = server.get_user(args[0])