1# $EPIC: mode,v 1.13 2002/10/05 02:56:57 kitambi Exp $
2Synopsis:
3   mode <your nickname|channel> [<+|-><mode> [<mode parameter(s)>]]
4
5# Currently I (hop) am renovating the structure of this help file.  The
6# first part of the help file will be a basic description of the purpose
7# of modes in irc, both to users and to channels.  Then a description of
8# user modes will follow, with each user mode documented and its side
9# effects explained.  Each network will get a section where its deviant
10# user modes will be explained.
11# After this, a description of channel modes, with each channel mode explained.
12# Each network will get a section where its deviant channel modes will be
13# explained.
14# After all of this, will be a description of how to use the /mode command,
15# complete with examples.  The first part of this help file should be put
16# in an external document at some point, but for now it's going to be in
17# here until we move it.
18
19About Modes:
20   A mode is an irc attribute which describes the current state of a channel
21   or irc user.  These are called "channel modes" and "user modes".  Modes
22   are traditionally single characters, usually lower case letters, and are
23   manipulated with the MODE command.  You can turn on ("set") a mode by
24   prefixing the character with a plus sign ('+') and turn off ("unset") a
25   mode by prefixing the character with a minus sign ('-').  You can set or
26   unset multiple modes at a time.
27
28User Modes:
29   You can set and unset your user modes to change certain attributes about
30   your irc session.  User modes are lost when your server connection ends.
31   You may be given a set of "default" user modes by your server when you
32   initially connect to it.  You may be given a set of extra user modes when
33   the OPER command is successful.  Some user modes are "privileged"
34   which means that you cannot turn them on yourself; the server has to
35   turn them on for you.  You may not change or query the mode of any other
36   user.
37
38   Standard User Modes:
39      i   "Invisible mode".  Everybody is permitted to ask for a list of
40          members on a channel, or a detailed list of members on a channel
41          with the NAMES or WHO request.  If the requester is a
42          member of the channel he requests, he will see the full details of
43          all other members on the channel.  However, if the requester is
44          NOT a member of the channel he requests, any channel members who
45          have this user mode set will NOT be shown in the list.  They will
46          be "invisible" to those who are not channel members.  This same
47          effect occurs if you are a member of a secret channel (channel mode
48          +s, see below).
49      o   "Operator mode".  This user mode is privileged.  Some irc commands
50          (relating to the administration of the irc server and network) may
51          not be executed by those who do not have this user mode set. This
52          mode must be enabled through the sucessful use of the OPER
53          command, however, it can be removed with the MODE command
54      s   "Server Notices mode".  The server sends out special information
55          that is not generally useful to non-techie irc users when you turn
56          this user mode on.  Not every user receives every server notice just
57          because they have +s turned on.  Some server notices require more
58          than one user mode to be turned on (particularly +o).  The types and
59          number of messages you receive varies from server to server.
60      w   "Wallops mode".  Whereas server notices generally are of interest
61          to local users, WALLOPS ("Write ALL OperatorS") are of interest to
62          all privileged users on all servers.  You will receive WALLOPS when
63          you turn this user mode on.  Some networks restrict WALLOPS only
64          for server use.  Other networks permit operators to send WALLOPS.
65          Still other networks permit everybody to send WALLOPS.  As with
66          all other output modes, everything varies from server to server.
67
68   Non-standard User Modes:
69   Undernet (ircu2.9.x):
70      d   "Deaf mode".  The server will not send public message to this
71          client for any channels it is a member of.
72          This mode is primarily intended for services, and may or may
73          not be accessible to clients.
74      k   "No-kick mode".  This user mode is privileged.  All servers on
75          the network will reject any attempt to KICK this client from
76          any channel it is a member of.  There is no way to the server to
77          set this mode for you.
78
79   DALnet (ircu2.9.x+DAL, DAL4.x, Bahamut, Dreamforge)
80      g   All will see nickname collisions.  Those with user mode +o will
81          also see all uses of the OPER command and all failed/aborted
82          server connection attempts.
83      h   "Help mode".  This user mode is privileged.  The server will
84          show you all uses of the HELP protocol command.  All who WHOIS
85          you will get the 310 server numeric indicating your +h status.
86
87   IRCNet (irc2.9.x):
88      r   "Restricted mode".  The server will not permit this client to
89          become a channel operator either through the MODE command or
90          through the JOIN command.  The server will not permit this
91          client to use the NICK command.  You cannot unset this mode.
92     (s)  These servers do not have the +s user mode.
93
94   EFnet [Comstud] (irc2.8.x+CSr27 and beyond):
95      b   When enabled, shows connects from potential bots, and attempts
96            with invalid usernames.
97      c   When enabled, shows all clients connecting and disconnecting
98            from your server.  Limited to irc operators.
99      d   When enabled, shows connects where the username given and the
100            client's ident response differ.
101      f   When enabled, shows all "Fake MODE" and "Nickname Collision"
102            notices.
103      k   When enabled, shows all global and local operator kills.
104      l   When enabled, shows connect attempts from clients that exceed
105            their connect class (Y:line) limit.
106     (r)  Replaced by +bdl after CSr25.
107      s   When enabled, it shows any miscellaneous server notices that
108            are not shown with modes bcdfklu (even if they are not
109            enabled).
110      u   When enabled, shows all unauthorized connect attempts, as well
111            as connect attempts when the server has reached its maximum
112            connection limit.
113
114   EFnet [/th] servers (irc2.8/th):
115      User Modes:
116         c   When enabled, shows all clients connecting and disconnecting
117               from your server.  Limited to IRC operators.
118         d   Debug mode, displays miscellaneous messages.  Limited to irc
119               operators.
120         k   When enabled, shows all server kills
121         n   Shows all local nickname changes.  Limited to irc operators.
122         r   When enabled, shows all rejected connections.
123         s   When enabled, it shows any miscellaneous server notices that
124               are not shown with modes ckr, including operator kills
125         y   Spy mode, informs operators of all LINKS, STATS, and TRACE
126               commands issued, and of any failed MSG commands.
127
128   EFnet Hybrid 6 servers (2.8/hybrid-6):
129      User Modes:
130         O   Designates this client is a local IRC Operator.
131         o   Designates this client is a global IRC Operator.
132         w   Can see server wallops.
133               May be irc operator only depending on server configuration.
134         z   Can see oper wallops.
135               No function unless irc operator.
136         s   Can see generic server messages and oper kills.
137         c   Can see client connections and exits.
138               No function unless irc operator.
139         r   Can see 'rejected' client notices.
140               No function unless irc operator.
141         k   Can see server kill messages.
142         f   Can see 'I-line is full' notices.
143               No function unless irc operator.
144         y   Can see stats/links/admin requests to name a few.
145               No function unless irc operator.
146         d   Can see server debug messages. Note that if the server was
147               compiled with DEBUG defined, this information can potentially
148               be an invasion of user privacy.
149               Limited to irc operators with D flag.
150         n   Can see client nick changes. Limited to irc operators with N flag.
151         b   Can see bot detection notices.
152               No function unless irc operator
153
154   EFnet Hybrid 7 servers (2.8/hybrid-7):
155      All modes for EFNet Hybrid 6 Servers apply, and the following
156      additional modes are available, or are changed in meaning.
157      User Modes:
158        (O)   Obsolete. Hybrid-7 does not support local operators.
159         a    Server administrator flag. Automatically set by server in
160              conjunction with the OPER command, not usable by normal users.
161         g    Reject all PRIVMSG/NOTICE not addressed to a channel, unless
162              the sender has been authorized by the ACCEPT protocol command
163              (presently you must use /quote for this)
164
165   AnotherNet servers
166      User Modes:
167         c   Show all [dis]connections, possible clones, and invalid logins
168         f   Show all DCC handshakes (mnemonic: file transfers)
169         h   Makes operator completely invisible to all normal users;
170             mainly meant for channel services (mnemonic: hidden)
171
172   UnderNet servers
173      Server notice masks:
174         Under ircu servers the +s usermode can optionally take a numeric
175         argument prefixed by + or -
176         This argument is used to show only specific types of server messages.
177           1     unsorted old messages
178           2     server kills (nick collisions)
179           4     oper kills
180           8     desyncs (hack2)
181           16    temporary desyncs (hack3)
182           32    unauthorized connections
183           64    common TCP or socket errors
184           128   too many connections
185           256   services actions on channels (hack4)
186           512   glines
187           1024  net join/break, etc
188           2048  IP mismatches
189           4096  host throttle add/remove notices
190           8192  old oper-only messages (Oper Only)
191           16384 client connect/exit messages (Oper Only)
192         To set a server notice mask (allowing you to see that type of notice)
193           /mode <your nickname> +s +mask
194         Only one number may be specified, and it is added to your current
195           server notice mask. However you can combine values before passing them
196           to the mode command.
197         To clear a server notice mask (preventing you from seeing that type of
198           notice)
199           /mode <your nickname> +s -mask
200         Default server notice mask for users who just set +s usermode is 1540
201           (4+512+1024)
202         Default server notice mask for opers is 1799 (1+2+4+256+512+1024)
203
204
205Channel Modes:
206   You can set and unset your user modes to change certain attributes about
207   a channel.  Channel modes are lost when the last person leaves a channel
208   (the channel is destroyed).  Channels may be given a set of "default"
209   channel modes by the server when you create it.  The first person to join
210   a channel creates it and becomes the channel operator.  The mode of a
211   channel may only be changed by one of its operators.  The operatorship
212   may be shared among any of the channel's members.
213   be set and unset by channel operators.
214   "prinitially nnect to it.  You may be given a set of extra user modes when
215   the OPER command is successful.  Some user modes are "privileged"
216   turn them on for you.  You may not change or query the mode of any other
217   user.
218
219
220   Standard Channel Modes:
221      b   When enabled, this prevents the specified nick!user@host mask
222            from entering the channel.  If only the @host portion is
223            specified, "*!*" is prepended; if only user@host is specified,
224            "*!" is prepended; if the mask does not contain a "@", it is
225            assumed to be a nickname, and a !*@* is appended.  When used
226            with no arguments, the channels list of "bans" is displayed.
227            On some servers, this also prevents any users matching the
228            specified nick!user@host mask from speaking on the channel or
229            changing nicks.
230      i   When enabled, users may only join the channel if INVITEd.
231      k   When enabled, users may only join the channel if they specify
232            the proper "key" (which is specified when +k is set).
233      l   When enabled, only the specified number of users may enter the
234            channel.
235      m   When enabled, only users with +o or +v may speak on the channel.
236      n   When enabled, public messages from outside the channel are not
237            allowed.
238      o   When enabled, grants the specified nickname channel operator
239            status.
240      p   When enabled, the channel is made private.  The channel name
241            will not show up in WHO, WHOIS, NAMES, or LIST replies (though
242            users who are not +i will still be shown in NAMES, the channel
243            name is simply masked as "Private").
244            This no longer works as expected on all servers, as some have
245            given +p other meanings.
246      s   When enabled, makes the channel secret.  This is the same as +p,
247            except the channel will not show up in any WHO/WHOIS/etc.
248            queries from a person not on the channel.  Anyone who is on a
249            +s channel is effectively invisible, as per user mode +i.
250      t   When enabled, only channel operators may set a topic.
251      v   When enabled, grants the specified nickname voice status.
252
253
254	IRCNet
255      Channel Modes:
256         a   When enabled, this makes the channel anonymous.  Nicknames are
257               hidden (and thus nick changes are not shown), and no other
258               channel modes are permitted.  Note that this can seriously
259               confuse the client...
260         I   Invite exemption. This takes a hostmask like a ban would, and
261             acts as a perminant invite.
262         e   Ban exemption. Same format as +b, except user matching a
263               ban exemption can join regardless of bans.
264
265	Hybrid6
266      Channel Modes:
267         e   Ban exemption. Same format as +b, except users matching a
268               ban exemption can walk through any bans matching them.
269               The server may remove ban exemptions automatically when
270               a ban-exempt client is kicked shortly after joining through
271               a ban.
272         p   Paranoid. Channel operators will see when another channel
273               operator invites someone. (this differs from the old
274               chanmode p, which was formerly used for "private" mode)
275               Beware that this will not have the desired effect in a
276               mixed hybrid-6/hybrid-7 network, as +p is redefined to mean
277               knock disable in hybrid-7.
278
279	Hybrid7
280      Channel Modes:
281         a   Anonymous channel operators. Channel operators will not be
282               identified as channel operators, and channel operator commands
283               will not reveal the identity of a channel operator.
284         e   Ban exemption. Same format as +b, except users matching a
285               ban exemption can walk through any bans matching them.
286               The server may remove ban exemptions automatically when
287               a ban-exempt client is kicked shortly after joining through
288               a ban.
289         p   Knock Disable - This differs yet again from previous uses for
290               the +p channel mode, which previously meant "private" or
291               "paranoid". Setting this mode on a channel will prevent
292               KNOCK from being used on hybrid-7 servers. This will not
293               have the expected results on a mixed hybrid-6/hybrid-7
294               network!
295         I   Invite exemption. This takes a hostmask like a ban would, and
296             acts as a perminant invite.
297
298
299
300Description:
301   Both channels and users have modes associated with them.  For channels,
302   they determine who is a channel operator, the number of people who may
303   join the channel, who may not enter the channel, and myriad other
304   things.  For users, they determine whether the user will is an IRC
305   operator, whether the user will receive special server notices, etc.
306
307   Modes are enabled when prepended with a "+", and disabled when with a
308   "-".  Modes may be clustered as well.  When clustering modes, all mode
309   changes are specified first, then their parameters (see the examples
310   below).
311
312Examples:
313   To receive operator WALLOPS and server notices (both examples are
314   equivalent):
315      /mode your_nick +sw
316      /mode your_nick +s+w
317
318   To set a channel limit (the number is arbitrary):
319      /mode #channel +l 35
320
321   To make someone a channel operator:
322      /mode #channel +o theirnick
323
324   To set a ban, a key, and to remove chanop status from someone:
325      /mode #channel +bk-o *!*some@*.ban.com Secret_Key foobar
326
327See Also:
328   chanmode(6); deop(4); invite(1); key(6); kick(1); on(5) mode,
329   mode_stripped; oper(4); set(4) mode_stripper; usermode(6); wallops(4)
330
331Restrictions:
332   Only channel operators may set modes for a channel (though anyone may
333   view them), and only you may set or view your personal user modes.
334   Additionally, the user mode +o may NOT be set with MODE, you must use
335   the OPER command.  However, it may be removed with -o (see DEOP as
336   well).
337
338   Also note that some server variants do not allow for redundant mode
339   changes, such as "+oo foobar foobar".  This shouldn't cause too many
340   problems though, since you can easily reverse a mode if you wish to set
341   it again, such as "-o+o foobar foobar", which is allowed.
342
343   Finally, note that mode changes are limited to a maximum of 4 total
344   parameters.  Thus you could give +o to 3 people and set +l, but you
345   could not do those and set +k as well, since that would involve 5
346   parameters.
347
348Other Notes:
349   On Undernet servers, the maximum number of parameters for MODE is 6.
350   Additionally, some server versions have extra modes that may be used.
351   Keep in mind that these do not apply everywhere, so you should check
352   what software version your server is using to be sure (see VERSION).
353
354   Undernet servers (ircu2.9.x):
355      User Modes:
356         d   When enabled, your client does not receive any public messages
357               from any channel you are on. (mnemonic: deaf mode)
358         k   No-kick mode.  Any client with this mode may not be kicked from
359               any channel it applies to.  Limited to services.
360
361   DALnet servers (ircu2.9.x+DAL, DAL4.x)
362      User Modes:
363         g   Allows operators to see all OPER attempts, and failed server
364               connects.  Allows all users to see nickname collisions.
365         h   Shows operators the arguments to any protocol HELP command
366               issued.  Server numeric 310 is returned in WHOIS to denote
367               +h users.
368
369   IRC 2.9 servers (irc2.9.x):
370      User Modes:
371         r   When enabled, the client cannot be a channel operator (even if
372               it is the first to join), nor can it change nicknames.  This
373               mode is automatic if the connecting client has a matching i:
374               line.  This mode cannot be reversed once enabled.
375        (s)  Version 2.9 servers do not have a +s user mode.
376
377      Channel Modes:
378         a   When enabled, this makes the channel anonymous.  Nicknames are
379               hidden (and thus nick changes are not shown), and no other
380               channel modes are permitted.  Note that this can seriously
381               confuse the client...
382
383   EFnet +CS servers (irc2.8.x+CSr27 and beyond):
384      User Modes:
385         b   When enabled, shows connects from potential bots, and attempts
386               with invalid usernames.
387         c   When enabled, shows all clients connecting and disconnecting
388               from your server.  Limited to irc operators.
389         d   When enabled, shows connects where the username given and the
390               client's ident response differ.
391         f   When enabled, shows all "Fake MODE" and "Nickname Collision"
392               notices.
393         k   When enabled, shows all global and local operator kills.
394         l   When enabled, shows connect attempts from clients that exceed
395               their connect class (Y:line) limit.
396        (r)  Replaced by +bdl after CSr25.
397         s   When enabled, it shows any miscellaneous server notices that
398               are not shown with modes bcdfklu (even if they are not
399               enabled).
400         u   When enabled, shows all unauthorized connect attempts, as well
401               as connect attempts when the server has reached its maximum
402               connection limit.
403
404   EFnet /th servers (irc2.8/th):
405      User Modes:
406         c   When enabled, shows all clients connecting and disconnecting
407               from your server.  Limited to IRC operators.
408         d   Debug mode, displays miscellaneous messages.  Limited to irc
409               operators.
410         k   When enabled, shows all server kills
411         n   Shows all local nickname changes.  Limited to irc operators.
412         r   When enabled, shows all rejected connections.
413         s   When enabled, it shows any miscellaneous server notices that
414               are not shown with modes ckr, including operator kills
415         y   Spy mode, informs operators of all LINKS, STATS, and TRACE
416               commands issued, and of any failed MSG commands.
417   EFnet Hybrid 6 servers (2.8/hybrid-6):
418      User Modes:
419         O   Designates this client is a local IRC Operator.
420         o   Designates this client is a global IRC Operator.
421         w   Can see server wallops.
422               May be irc operator only depending on server configuration.
423         z   Can see oper wallops.
424               No function unless irc operator.
425         s   Can see generic server messages and oper kills.
426         c   Can see client connections and exits.
427               No function unless irc operator.
428         r   Can see 'rejected' client notices.
429               No function unless irc operator.
430         k   Can see server kill messages.
431         f   Can see 'I-line is full' notices.
432               No function unless irc operator.
433         y   Can see stats/links/admin requests to name a few.
434               No function unless irc operator.
435         d   Can see server debug messages.
436               Limited to irc operators with D flag.
437         n   Can see client nick changes. Limited to irc operators with N flag.
438      Channel Modes:
439         e   Ban exemption. Same format as +b, except users matching a
440               ban exemption can walk through any bans matching them.
441         p   Paranoid. Channel operators will see when another channel
442               operator invites someone. (this differs from the old
443               chanmode p, which was formerly used for "private" mode)
444
445   EFnet Hybrid 7 servers (2.8/hybrid-7):
446      All modes for EFNet Hybrid 6 Servers apply, and the following
447      additional modes are available, or are changed in meaning.
448      User Modes:
449         a    Server administrator flag. Automatically set by server in
450              conjunction with the OPER command, not usable by normal users.
451         g    Reject all PRIVMSG/NOTICE not addressed to a channel, unless
452              the sender has been authorized by the ACCEPT protocol command
453              (presently you must use /quote for this)
454      Channel Modes:
455        a     Anonymous channel operators. Channel operators will not be
456              identified as channel operators, and channel operator commands
457              will not reveal the identity of a channel operator.
458        I     Standing Invitation. Format is the same as a ban. Users matching
459              will be able to join regardless of the +i mode, as if they had
460              been given an INVITE by one of the ops.
461
462   AnotherNet servers
463      User Modes:
464         c   Show all [dis]connections, possible clones, and invalid logins
465         f   Show all DCC handshakes (mnemonic: file transfers)
466         h   Makes operator completely invisible to all normal users;
467             mainly meant for channel services (mnemonic: hidden)
468
469   UnderNet servers
470      Server notice masks:
471         Under ircu servers the +s usermode can optionally take a numeric
472         argument prefixed by + or -
473         This argument is used to show only specific types of server messages.
474           1     unsorted old messages
475           2     server kills (nick collisions)
476           4     oper kills
477           8     desyncs (hack2)
478           16    temporary desyncs (hack3)
479           32    unauthorized connections
480           64    common TCP or socket errors
481           128   too many connections
482           256   services actions on channels (hack4)
483           512   glines
484           1024  net join/break, etc
485           2048  IP mismatches
486           4096  host throttle add/remove notices
487           8192  old oper-only messages (Oper Only)
488           16384 client connect/exit messages (Oper Only)
489         To set a server notice mask (allowing you to see that type of notice)
490           /mode <your nickname> +s +mask
491         Only one number may be specified, and it is added to your current
492           server notice mask. However you can combine values before passing them
493           to the mode command.
494         To clear a server notice mask (preventing you from seeing that type of
495           notice)
496           /mode <your nickname> +s -mask
497         Default server notice mask for users who just set +s usermode is 1540
498           (4+512+1024)
499         Default server notice mask for opers is 1799 (1+2+4+256+512+1024)
500