From 8bcb3ef6bc433ae9ca5416309dc33de07fcf805f Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Sun, 12 Apr 2015 21:48:34 -0600 Subject: [PATCH] Check all user subcommands for param count Fixes more problems found in #899 (thanks Marcus) --- TShockAPI/Commands.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TShockAPI/Commands.cs b/TShockAPI/Commands.cs index 4b0fe22f..d2ff15b5 100755 --- a/TShockAPI/Commands.cs +++ b/TShockAPI/Commands.cs @@ -971,7 +971,7 @@ namespace TShockAPI string subcmd = args.Parameters[0]; // Add requires a username, password, and a group specified. - if (subcmd == "add") + if (subcmd == "add" && args.Parameters.Count == 4) { var user = new User(); @@ -1059,7 +1059,7 @@ namespace TShockAPI } } // Group changing requires a username or IP address, and a new group to set - else if (subcmd == "group") + else if (subcmd == "group" && args.Parameters.Count == 3) { var user = new User(); user.Name = args.Parameters[1];