CREATE (new IRCX command)

Create a new channel and/or join an existing channel.

Syntax:

Syntax: CREATE <channel> [<modes> [<modeargs>]]

Parameters

<channel> The name of the channel.

<modes> Initial channel modes, not separated by spaces (like MODE command). Includes mode 'e' to force a clone of a clonable channel.

<modeargs> Optional mode arguments, separated by spaces, in the same order as the modes. For the mode 'l' the mode argument is the maximum number of members in the channel. For the mode 'k' the mode argument is the channel keyword. These are the only modes that require mode arguments.

Results

CREATE message
JOIN message
RPL_TOPIC
RPL_NAMEPLY
RPL_ENDOFNAMES

Possible Errors

IRCERR_CHANNELEXIST
IRCERR_ALREADYONCHANNEL
ERR_NEEDMOREPARAMS
ERR_INVITEONLYCHAN
ERR_CHANNELISFULL
ERR_BANNEDFROMCHAN
ERR_BADCHANNELKEY
ERR_TOOMANYCHANNELS
ERR_UNKNOWNCOMMAND

Remarks

The CREATE command provides a method to specify channel properties at creation time, and also provides a method (flag 'c') to create and join a channel only if it does not already exist. If user is not in IRCX mode, server returns ERR_UNKNOWNCOMMAND.

Example

This example shows the creation of a moderated (m) channel with the following properties and modes: its topic can only be changed by an owner or host (t = TOPICOP), messages from outside the channel are blocked (n = NOEXTERN), it is limited to 50 members (l 50), it has a member key which is 'password' (k password), and it will be created only if it doesn't already exist (c = CREATE).

Example 3.7. Creation Example

Client: CREATE #MyChannel tnmlkc 50 password
Server: :<server> CREATE #MyChannel 048532944

[Note]Editor's Note

This example has been altered slightly from the original IRCX draft's example to provide clarity.

[Note]Editor's Note

The IRCX draft does not explain CREATE clearly enough, so it is necessary to further explain the purpose of this command. When a client uses the CREATE command, the server should either make the user join that channel (if it exists already), or create and join the channel. If there is a member key set on the channel and a user tries to use CREATE to join it, they must have specified a key. If not, ERR_BADCHANNELKEY should be returned. If a user is attempting to CREATE a channel that already exists, and has specified modes, the server must not apply these modes to the channel. In addition, if a user attempts to join a channel using the CREATE command and fails, the proper error message should be sent.

When a user CREATEs a channel that doesn't already exist, all modes specified in the command are applied to the channel (assuming the user has permission to apply said modes).

Every CREATE message should result in that user JOINing the channel (and getting a JOIN reply). The only case where this may not be true is if the 'c' flag is passed as a mode. When this happens, a JOIN reply will only occur if the channel does not already exist. If the channel exists and this mode was passed, ERR_CHANNELEXIST should be returned.