Fix NullPointerException when using upercase characters in command names

This commit is contained in:
Sebastian Kaspari 2011-03-06 14:03:34 +01:00
parent d2a638d527
commit 635b90b5da
1 changed files with 3 additions and 1 deletions

View File

@ -166,12 +166,14 @@ public class CommandParser
public void handleClientCommand(String type, String[] params, Server server, Conversation conversation, IRCService service)
{
BaseHandler command = null;
if (commands.containsKey(type.toLowerCase())) {
command = commands.get(type);
command = commands.get(type.toLowerCase());
} else if (aliases.containsKey(type.toLowerCase())) {
String commandInCommands = aliases.get(type.toLowerCase());
command = commands.get(commandInCommands);
}
try {
command.execute(params, server, conversation, service);
} catch(CommandException e) {