User:K6ka/IRC handbook/Modes

From K6ka's Wiki
Jump to navigation Jump to search

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[edit source]

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.

Channel modes[edit source]

Standard channel modes[edit source]

Channel modes are usually set by typing in /mode #channelname <mode changes>.

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 /mode #freenode +m. To unset cmode +m on the same channel, type /mode #freenode -m.

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 /mode #freenode +mz. To set both cmode+m and cmode +z while simultaneously removing cmode +r, type in /mode #freenode +mz-r.

Advanced channel modes[edit source]

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 /mode #freenode +l 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:

/mode #freenode +l 20

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

List of channel modes[edit source]

Channel mode Name Description
No parameters
+n No external messages If this mode is enabled, only users who are inside of a channel can send messages to it. Without this mode, anyone (even those not in the channel) can send messages to it by sending a raw "PRIVMSG #channelname <message>" command. On freenode this mode is enabled by default.
+t Ops Topic Only allows channel operators to change the topic of a channel. If this is unset, anyone can change the topic of a channel. On freenode, this mode is enabled automatically when a channel is registered; it is unset by default otherwise.
+s Secret If this is enabled, the channel will not be shown in /whois and /list commands, and the alis IRC service bot will ignore it. This means that users cannot find the channel if they try to search for it using the /list command or alis, and they will not see the channel if they WHOIS a user that's in the channel (Unless they themselves are on it). On freenode this mode is set when a channel is first created, and will automatically be removed once it is registered.
+p Private If this is enabled, users cannot use the /knock command to request access to the channel. Users can /knock on a channel if it is not open (e.g. an invite only channel), which will send a message to the channel operators in the channel asking for access. On freenode, +p and +s can be used together.
With parameters

User modes[edit source]

List of user modes[edit source]

User mode Name Description
+o Oper This mode is set if you an IRC operator. It cannot be manually set.
+i Invisible Designates you as "invisible". When this mode is set, people cannot see the channels you are on when they WHOIS you, unless they are in the same channels that you are in. On freenode, this mode is set by default.
+g Caller ID mode If this mode is set, only accepted clients are allowed to private message you. This is useful for combating extreme cases of spam.
+w Wallops Allows you to see oper wallops. A wallop is a special message sent out by network operators, often used to send out announcements. On freenode, this is typically used for less-important announcements, and this mode is unset by default since it can be noisy.
+D Deaf If this mode is set, you will not receive any channel messages. You probably don't want to set this in most cases (It is used by services; some other bots may use it as well). Does not affect private messages.
+Q No channel forwarding If this mode is set, you will not be automatically forwarded to another channel, either through cmode +f, or by a specially configured ban. Instead, you will receive a message as to why you could not join.
+R Registered only If this mode is set, only people who have identified to NickServ will be able to send you a private message.
+Z SSL user If this mode is set, you are connected to the IRC server via SSL. It is automatically set (or not set) by the server, cannot be manually set or unset.