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.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) {
    if (conversation != null) {
      Message errorMessage=new Message(type + ": " + e.getMessage());
      errorMessage.setColor(Message.COLOR_RED);
      conversation.addMessage(errorMessage);
      Message usageMessage=new Message("Syntax: " + command.getUsage());
      conversation.addMessage(usageMessage);
      Intent intent=Broadcast.createConversationIntent(Broadcast.CONVERSATION_MESSAGE,server.getId(),conversation.getName());
      service.sendBroadcast(intent);
    }
  }
}

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 . 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 ) { if ( conversation != null ) { Message errorMessage = new Message ( type + ": " + e . getMessage ( ) ) ; errorMessage . setColor ( Message . COLOR_RED ) ; conversation . addMessage ( errorMessage ) ; Message usageMessage = new Message ( "Syntax: " + command . getUsage ( ) ) ; conversation . addMessage ( usageMessage ) ; Intent intent = Broadcast . createConversationIntent ( Broadcast . CONVERSATION_MESSAGE , server . getId ( ) , conversation . getName ( ) ) ; service . sendBroadcast ( intent ) ; } } }
handle a client command
