User:K6ka/IRC handbook/Modes

Modes are special settings you can set on IRC. They are signified by a single letter that is case sensitive (For example, "mode Z" is different from "mode z"), and each mode has a different effect when they are set.

Modes can be a bit complicated at first, so before we get ahead of ourselves, let's start with the different types of modes on IRC.

Channel modes versus user modes
Channel modes (AKA cmode) are, well, modes set on channels. More specifically, they are modes that are applied to channels and generally affect users on the channel, either all or some. Channel modes set on one channel usually do not affect other channels. Channel modes can only be set by channel operators, network services, or the IRC server itself.

User modes (AKA umode) are modes that are applied to users on IRC, and usually only affect the user it is set on. User modes can only be set by the user themselves, or by the IRC server.

Channel modes are always cleared when the channel empties and is thus deleted by the server. If a user rejoins a channel that has been deleted, it will not have the modes set before it was deleted. Similarly, user modes are session-specific, and will be cleared and forgotten by the server if you disconnect. In both cases, you will need to manually set all the modes again.

Channel modes and user modes may share the same or similar letters, which may cause some confusion. To avoid this, it may be better to use the terms cmode or umode when discussing IRC modes in order to make it clear about what you are talking about.

Standard channel modes
Channel modes are usually set by typing in.

Mode changes are specified by typing in a + or - sign, followed immediately by the letters of the mode(s) you want to set or unset. For example, to set cmode +m on the #freenode channel, type in. To unset cmode +m on the same channel, type.

You can also set/unset multiple modes all at once. For example, to set both cmode +m and cmode +z, instead of sending two commands, it is possible to set both modes all at once by typing. To set both cmode+m and cmode +z while simultaneously removing cmode +r, type in.

Advanced channel modes
The channel modes mentioned above have no further configurable options; they are either set or unset.

Some channel modes, however, are further customizable, and accept what we call "parameters". A parameter is something you as the user can manually configure and control. This'll all make sense below.

Let's say that I want to limit the number of users on my channel to a cool 20. Cmode +l is the mode of choice for this, since that channel mode specifically enforces user limits on channels. However, I cannot set this mode all by itself, since it won't know what the limit should be.

To do this, I will type in  like usual, but now I will also specify the user limit I want to enforce right after where I type +l. So it will look like this:

Now, cmode +l will be set and a maximum of 20 users will be allowed in the channel at any one time.