private void handleMode(String hostmask, String line) {
        String[] parse = line.split(" ");
        String message = line.substring(line.indexOf(":", 1) + 1);
        String nickname = hostmask.substring(0, hostmask.indexOf("!"));
        String realname = hostmask.substring(hostmask.indexOf("!") + 1, hostmask.indexOf("@"));
        String hostname = hostmask.substring(hostmask.indexOf("@") + 1);
        String channel = parse[2];

        //Disregard if target is not a channel
        if (!parse[2].startsWith("#")) {
            return;
        }

        //:hostmask MODE channel +mode list
        String modes = parse[3];
        boolean plus = false;
        int mc = 1;
        for (int i = 0; i < modes.length(); i++) {
            String c = String.valueOf(modes.charAt(i));
            switch (c) {
                case "+":
                    plus = true;
                    break;
                case "-":
                    plus = false;
                    break;
                default:
                    if (parse.length >= mc + 3) {
                        onChannelUserMode(nickname, channel, (plus ? "+" : "-") + c, parse[mc + 3]);
                        mc++;
                    }
                    break;
            }
        }
    }