public boolean parseCommand(String command){
        //log.writeLn(command);
        String[] com = command.split(" "); // split command

        switch (com[0]){
            case "exit":
                return false;
            case "stop":
                if (server.isRunning()){
                    shutDown();
                } else {
                    log.writeLn("The server is already stopped");
                }
                break;
            case "start":
                if (!server.isRunning()){
                    startUp();
                } else {
                    log.writeLn("The server is already started");
                }
                break;
            case "help":
                break;
            case "clients":
                log.writeLn("Clients connected: " + server.getClients());
                break;        
            case "info":
                log.getProperties();
                break; 
            case "rmchannel":
                try {
                    server.removeChannel(com[1].trim());
                } catch (Exception e){
                    log.writeErr("Need a channel name");
                }
                break; 
            case "createchannel":
                try {
                    if (com[1] != null){
                        String temp = "";
                        for (int i=2;i<com.length;i++){
                            if (i == 2){
                                temp = com[i];
                            } else {
                                temp = temp + " " + com[i];
                            }
                        }
                        if (temp != ""){
                            server.createChannel(com[1], temp);
                        } else {
                            server.createChannel(com[1]);
                        }
                    }
                } catch (Exception e){
                    log.writeErr("Need name and topic to create channel.");
                }
                break; 
            case "channels":
                log.writeLn("There are " + server.returnChannels() + " channels");
                for (int i = 0; i < ServerThread.channelList.size(); i++){
                    log.writeLn("Name: " + ServerThread.channelList.get(i).getChannelName() + " Topic: " + ServerThread.channelList.get(i).getTopic());
                }
                break; 
            case "notify":
                //log.writeLn(command);
                String[] temp = command.substring(7).split(";");
                try {
                    server.sendCommand("notify " + temp[0] + ";" + temp[1]);
                    log.writeLn(temp[0] + " " + temp[1]);
                } catch (Exception e){
                    log.writeErr("notify takes two(2) that are seperated by a ';' character");
                }
                break;
            case "addadmin":
                
                try {
                    log.writeLn("Adding admin: " + com[1] + " to " + com[2]);
                    for (int i=0;i<ServerThread.clientList.size();i++){
                        if (ServerThread.clientList.get(i).getNickname() == null ? com[1] == null : ServerThread.clientList.get(i).getNickname().equals(com[1])){
                            server.setChannelAdmin(ServerThread.clientList.get(i), com[2]);
                            log.writeLn("success");
                        }
                    }
                } catch (Exception e){
                    log.writeErr("addadmin [nickname] [channel]");
                }
                
                break;
            case "restart":
                restart();
                break;
            default:
                log.writeErr("That command could not be found.");
                break;
        }
        return true;
    }