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:
parent
d2a638d527
commit
635b90b5da
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user