1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-11-22 08:52:18 -05:00

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

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) {