Wiki/Services/IRC.d/IRC_Commands_and_Modes.md

9.3 KiB

Basic Commands

: Borrowed from [https://en.wikipedia.org/wiki/Wikipedia:IRC/Tutorial the Wikipedia tutorial]

Users should also type "/msg NickServ help" into their client for help with nickname questions or user preferences, or use "/msg ChanServ help" for help with registering and administering channels.

{| class="wikitable" !Command || What it does || Example |- |/attach
/server || Sign on to a server || /attach chat.freenode.net
/server chat.freenode.net |- |/nick || Set your nickname || /nick YourName |- |/join || Join a channel || /join #en.wikibooks |- |/part || Leave a channel || /part #en.wikibooks |- |/msg || Sends a message (can either be private or to the entire channel) || Message the channel: /msg #en.wikibooks Hello, World!
Send a private message: /msg JohnDoe Hi, John. |- |/whois || Display information about a user on the server || /whois JohnDoe |- |/clear
/clear all || Clears a channel's text.
Clears all open channel's text. || /clear
/clear all |- |/away || Sets an away message. Note: Type /away again to return from away. || /away I'm away because... |- |/me || Sends an action to the channel. See example. || The following:
/me loves pie.
would output to the chat in the case of JohnDoe:
JohnDoe loves pie. |- |/quit || Disconnects you from the IRC network. You can also quit with a quit message. || /quit Off to bed. What happens: JohnDoe has quit (Off to bed) |}

Channel Modes

Channel modes allow you to change the way the channel reacts to certain events. All channels have modes +nt set on them by default. To change a channel mode, simply enter:

/mode #channel +m

Keep in mind that Channel Modes are case sensitive, +b and +B are NOT the same thing. All the time codes do not have to be in seconds, if you want to do a 10 minute ban, rather than using "600" for your time, you can do "10m". Supported time codes are:
1y2m3w4d5h6m
Below is a list of Channel Modes supported by InspIRCd:

Core Modes

{||class="wikitable" |- |b [n!u@h]||Bans matching [n!u@h] from joining the channel. Also, be sure to check out the extbans. |- |i||Sets the channel as Invite-Only |- |k [key]||Sets a key on the channel. |- |l [number]||Sets the channel limit to [number]. Once the limit is reached, no more users can join. |- |m||Makes a channel "moderated". Only +qaohv can talk. (You must have at least a voice to talk) |- |n||Forces a user to be in the channel to PRIVMSG it. You probably want to keep this mode. |- |o [nick]||Makes [nick] a channel Operator. |- |p||Sets the channel as 'private'. Will not show up in /LIST, but WILL still show up in your WHOIS. |- |s||Sets the channel as 'secret'. Will not show up in /LIST or /WHOIS, generally preferred over +p |- |t||Forces a user to have +o or +h to change the topic. You probably want to keep this mode. |- |v [nick]||Gives voice to [nick]. Voiced users have no real power, the only thing special about being voiced is being able to speak when mode +m is set. |}

Modular Modes

These modes are available through modules. Once the module is unloaded, modes will be removed, and their effects gone. {||class="wikitable" |- |A||allowinvite||Allows all users in the channel to use /INVITE, even if they don't have half-op or above. |- |a||chanprotect||Gives protected status to [nick]. This protects them from channel ops (+o); as of 2.0, this now implies +o. |- |B||blockcaps||Blocks messages with too many CAPITAL LETTERS. The amount of capital letters that is decided to be too many is set by the network configuration. |- |C||noctcp||Blocks CTCPs to the channel. |- |c||blockcolor||Blocks messages and notices with colour or formatting codes. Also see chanmode +S. |- |D||delayjoin||Users are not shown as joined until they speak. |- |d [sec]||delaymsg||Disallows a user from talking in the channel unless they've been joined for [num] seconds. |- |e [n!u@h]||banexception||Allows users matching [n!u@h] to bypass +b |- |F [num]:[sec]||nickflood||Allows only [num] nick changes every [sec] seconds in a channel. |- |f {}[num]:[sec]||messageflood||Allows only [num] messages from a user every [sec] seconds. Exceeding this will enact a KICK on the offending user (or ban if the * is included.) |- |G||censor||Censors bad words from the channel based on network configuration. |- |g [keyword]||chanfilter||Blocks messages matching [keyword]. Wild cards are usable here; however, must be done with wildcards surrounding the keyword as well. For example, if you wanted to filter [keyword], you would type: /mode +g keyword* |- |H [num:sec]||chanhistory||Displays the last [num] lines of chat to a user joining a channel; [sec] is the maximum time to keep lines in the history buffer. Designed so that the new user knows what the current topic of conversation is when joining the channel. |- |h [nick]||halfop||Makes [nick] a channel Half-Operator |- |I [n!u@h]||inviteexception||Allows users matching [n!u@h] to bypass +i |- |J [sec]||kicknorejoin||Disallows a user from joining [sec] seconds after being /KICK'd |- |j [num]:[sec]||joinflood||Allows only [num] users to join the channel in [sec] seconds. |- |K||knock||Disallows usage of /KNOCK on the channel. |- |L [channel]||redirect||When the channel is "full" (from channel mode "l"), forwards the user to [channel]. |- |M||services_account||Users must be registered with services to speak in the channel. |- |N||nonicks||Disallows nick changes for users on the channel. |- |O||operchans||Marks a channel as an oper-only channel; only users who are oper'ed will be able to join these channels. As well, only opers may set channel mode +O. |- |P||permchannels||Marks the channel as "permanent". Will not disappear when there are no users. Note that only opers can set this mode. |- |Q||nokicks||Disallows channel kicks, except Services / U-Lined clients. |- |q||chanprotect||Makes [nick] a channel owner. Protects from +a and +o; as of 2.0, this now implies +o. |- |R||services_account||Users must be registered with services to join the channel. |- |r||services_account||Marks a channel as registered. While some services still use this (namely Anope), this mode is mostly depreciated. |- |S||stripcolor||Strips colour or formatting codes from messages and notices to the channel. Note that the user sending the message will still see the colour and/or formatting. Also see chanmode +c. |- |T||nonotice||Blocks /NOTICEs to the channel. |- |u||auditorium||Creates an "Auditorium" channel. |- |w [flag]:[banmask]||autoop||Adds basic channel access controls of [flag] to [banmask], via the +w listmode. For example, +w o:R:Brain will op anyone identified to the account "Brain" on join. |- |X [flag]:[restriction]||exemptchanops||Allows the level of channel access required to bypass a given permission to be set. For example, setting +NX v:nonick will prevent people from changing nicks unless they are voiced (or opped/halfopped). |- |Y||ojoin||Marks a user as an oper in-channel with a definable prefix in front of their nick, when an oper issues the /ojoin #channel command. An oper with +Y cannot be kicked or deoped. Note that this mode is oper only. |- |y||operprefix||Marks a user as an oper in-channel with a definable prefix in front of their nick. If this module is loaded, all opers will permanently be prefixed with the character, as opposed to +Y, which only prefixes during an /ojoin. Note that this mode is oper only. |- |Z||namedmodes||This module allows for the display and manipulation of channel modes via long-form mode names. For example, to set a channel ban with named modes:

/MODE #channel +Z ban=foo!bar@baz
|- |z||sslmodes||All users must be connected to the network via SSL to join the channel. |}

ChanServ will by default set modes "keeptopic peace cs_secure securefounder secureops topiclock persist cs_keep_modes signkick topiclock" on any registered channel. NickServ adds +r to any registered user, and first user to join a channel will be founder. Here are some other recommendations.

  1. Private channels should receive mode +Rs or +Ris to prevent unwanted visitors.
  2. Network-maintained channels should get the ChanServ no-expire setting -- user-defined channels should not.
  3. Hierarchy in the channel should be laid out according to the following:
    1. Channel founders (and successors if any) should be in the ChanServ qop list and have mode +q. Network-maintained channels should have an IRC NetAdmin as channel founder.
    2. Channel bots should receive mode +s and be in the Chanserv sop list.
    3. Channel moderators should receive mode +o and be in the ChanServ aop list.
    4. Channel moderators in training should receive mode +h and be in the ChanServ hop list.
  4. Channels should receive descriptive topics, URLs, and descriptions in their ChanServ settings so that users can learn more about the project.

IRC Operation

IRC Operation is a complicated issue for even small networks. Various sites offer some assistance [http://www.irchelp.org/ircd/ircopguide.html IRCHelp.org, accessed 2019/04/24] but all IRC operators or "IRCops" should be familiar with the KILL, REHASH, RELOAD, DIE, TRACE, STATS, LINKS, and HTM commands, as well as their individual module config. Refer to your IRCd's documentation for the syntax on these.