if (this.user != null) { Channel tmpChannel = this.user.getFromAllowedChannelByName(name); if (tmpChannel != null) { this.user.setCurrentChannel(tmpChannel); } else { this.sendCommand( new JoinChannelErrorCommand()); } } else { this.sendCommand( new LoginErrorCommand()); }
if (this.user != null) { Channel tmpChannel = this.user.getFromAllowedChannelByName(name);  if (tmpChannel != null) { this.user.setCurrentChannel(tmpChannel); } else { this.sendCommand(new JoinChannelErrorCommand()); } } else { this.sendCommand(new LoginErrorCommand());
    public void joinChannel(String name) {        if (this.user != null) {            Channel tmpChannel = this.user.getFromAllowedChannelByName(name);            if (tmpChannel != null) {                this.user.setCurrentChannel(tmpChannel);            }            else {                this.sendCommand(                    new JoinChannelErrorCommand());            }        }        else {            this.sendCommand(                new LoginErrorCommand());        }    }