void joinChannel(String cname, Client client) {
        if (checkForChannel(cname)) {
            Channel c = getChannelByName(cname);
            try {
                clients.remove(client);
            } catch (Exception e) {
                e.printStackTrace();
            }
            if (c.checkUser(client) == false) {
                c.addUser(client);
                c.sendChannelMSG(":" + client.getName() + "!" + client.getName() + "@" + client.getIP() + " JOIN " + "#" + cname);
                c.sendChannelMSG(":" + client.getName() + " MODE " + client.getName() + " :" + "+i");
                client.setMode("+i");

            }

        } else {
            Channel c = getChannelByName(cname);
            try {
                clients.remove(client);
            } catch (Exception e) {
                e.printStackTrace();
            }
            if (c.checkUser(client) == false) {
                c.addUser(client);
                c.sendChannelMSG(":" + client.getName() + "!" + client.getName() + "@" + client.getIP() + " JOIN " + "#" + cname);
                c.sendChannelMSG(":" + client.getName() + " MODE " + client.getName() + " :" + "+i");
                client.setMode("+i");

            }

        }
    }