Skip to content
Permalink
Browse files

Make inserts in AbstractListEdit work again.

Short-Command completer was expanding this to "insert" (Line 183) but the command handler only worked for "ins" (Line 209).

Command handler now accepts "ins" or "insert" in case short commands are off.
  • Loading branch information...
ShaneMcC committed Feb 19, 2019
1 parent 4edbe7c commit f5ae088d853200465e500a3752b291df75fe4120
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/com/dfbnc/commands/AbstractListEditCommand.java
@@ -72,7 +72,7 @@ public ListOption checkItem(final String command, final String input, final User
}

/**
* Get the output to give for an "add", "edit" or "ins" request without sufficient parameters
* Get the output to give for an "add", "edit" or "insert" request without sufficient parameters
*
* @param command Command to get usage info for (add, edit, ins)
* @return The output to give
@@ -206,7 +206,7 @@ public void handle(final UserSocket user, final String[] params, final CommandOu
} else {
output.addBotMessage("Your %s is currently empty.", getListName(listParamName));
}
} else if (canAdd(listParamName) && (actualParams[commandParam].equalsIgnoreCase("add") || actualParams[commandParam].equalsIgnoreCase("edit") || actualParams[commandParam].equalsIgnoreCase("ins"))) {
} else if (canAdd(listParamName) && (actualParams[commandParam].equalsIgnoreCase("add") || actualParams[commandParam].equalsIgnoreCase("edit") || actualParams[commandParam].equalsIgnoreCase("ins") || actualParams[commandParam].equalsIgnoreCase("insert"))) {
if (user.isReadOnly()) {
output.addBotMessage("Sorry, read-only sub-clients are unable to make changes to lists.");
return;

0 comments on commit f5ae088

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.