private void joinChan(String user_name, CommandArgsIterator args_it) 
            throws IOException
    {
        if (args_it.hasNext()) {
            String chan_arg = args_it.next();
            if (!args_it.hasNext() && chan_arg.length() >= 2
                    && chan_arg.charAt(0) == '#') {
                String chan_name = chan_arg.substring(1);
                
                Map<String, Chan> chans = this._server.getChans();
                boolean already_joined;
                synchronized (chans) {
                    synchronized (this._chans) {
                        if (!this._chans.containsKey(chan_name)) {
                            Chan chan = chans.get(chan_name);
                            if (chan != null)
                                chan.joinChan(user_name, this);
                            else {
                                new Chan(
                                    this._server, chan_name, user_name, this
                                );
                            }
                            already_joined = false;
                        } else
                            already_joined = true;
                    }
                }
                
                if (!already_joined) {
                    this.traceEvent("Rejoint le salon #" + chan_name);
                    this.ack();
                } else
                    this.writeCommand(Errors.ChanAlreadyJoined);
            } else 
                this.syntaxError();
        } else
            this.syntaxError();
    }