Add rewrite rule in legacy importer for for switchprimarygroup command (#1922)

This commit is contained in:
Luck 2020-01-09 23:18:05 +00:00
parent c454d17826
commit b73b73e221
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -242,6 +242,14 @@ public class LegacyImporter implements Runnable {
try {
List<String> args = CommandManager.stripQuotes(ARGUMENT_SPLITTER.splitToList(getCommand()));
// rewrite rule for switchprimarygroup command
if (args.size() >= 3 && args.get(0).equals("user") && args.get(2).equals("switchprimarygroup")) {
args.remove(2);
args.add(2, "parent");
args.add(3, "switchprimarygroup");
}
CommandResult result = this.commandManager.onCommand(this, "lp", args, Runnable::run).get();
setResult(result);
} catch (Exception e) {