private void handleWhoisResponse(int code, String response) {
        String[] parts = response.split(" ", 3);
        String nickname = parts[1];
        response = parts[2];

        PrivateMessagingListener listener = getPrivateMessagingListener(nickname);
        if (listener == null) {
            if (serverEventsListener == null) {
                return;
            } else {
                serverEventsListener.privateMessageWithoutListenerReceived(
                                    nickname, "[zaslány údaje o uživateli]");
                listener = getPrivateMessagingListener(nickname);
            }
        }

        if (code == RPL_WHOISCHANNELS) {
            response = response.substring(1);
        } else if (code == RPL_WHOISIDLE) {
            response = response.substring(0, response.indexOf(" ") );
        }

        switch (code) {
            case RPL_WHOISUSER:
                listener.whoisUser(response); break;
            case RPL_WHOISSERVER:
                listener.whoisServer(response); break;
            case RPL_WHOISIDLE:
                listener.whoisIdle(response); break;
            case RPL_WHOISCHANNELS:
                listener.whoisChannels(response); break;
        }
    }