if (old.getCurrentChannel() != null) { this.sendMsgToChannel("verlt den Channel"); } old.setCurrentChannel(tmpChannel); this.sendMsgToChannel("betritt den Channel");
old.setCurrentChannel(tmpChannel);
    public final void joinChannel(String name) {        User old = this.user;        // User vorhanden        if (old != null) {            Channel tmpChannel = old.getFromAllowedChannelByName(name);            // Channel existent            if (tmpChannel != null) {                if (old.getCurrentChannel() != null) {                    this.sendMsgToChannel("verlt den Channel");                }                old.setCurrentChannel(tmpChannel);                this.sendMsgToChannel("betritt den Channel");            }            // Channel nicht existent            else {                this.sendCommand(                    new JoinChannelErrorCommand());            }        }        // User nicht vorhanden        else {            this.sendCommand(                new LoginErrorCommand());        }    }