4 Modules

One way to add functionality to ERC is to customize which of its many modules are loaded.

There is a spiffy customize interface, which may be reached by typing M-x customize-option RET erc-modules RET. When removing a module outside of the Custom ecosystem, you may wish to ensure it’s disabled by invoking its associated minor-mode toggle with a nonpositive prefix argument, for example, C-u - M-x erc-spelling-mode RET. Additionally, if you plan on loading third-party modules that perform atypical setup on activation, you may need to arrange for calling erc-update-modules in your init file. Examples of such setup might include registering an erc-before-connect hook, advising erc-open, and modifying erc-modules itself.

The following is a list of available modules.


Set away status automatically


Join channels automatically


Integrate with the Big Brother Database


Buttonize URLs, nicknames, and other text


Mark unidentified users on freenode and other servers supporting CAPAB.

completion (aka pcomplete)

Complete nicknames and commands (programmable)


Wrap long lines


Launch an identd server on port 8113


Highlight or remove IRC control characters


Save buffers in logs


Highlight pals, fools, and other keywords


Display a menu in ERC buffers


Detect netsplits


Don’t display non-IRC commands after evaluation


Notify when the online status of certain users changes


Send you a notification when you get a private message, or your nickname is mentioned


Process CTCP PAGE requests from IRC


Make displayed lines read-only


Replace text in messages


Enable an input history


Enable SASL authentication


Scroll to the bottom of the buffer


Identify to Nickserv (IRC Services) automatically


Convert smileys to pretty icons


Play sounds when you receive CTCP SOUND requests


Check spelling of messages


Add timestamps to messages


Track channel activity in the mode-line


Truncate buffers to a certain size


Translate morse code in messages

Required Modules

Note that some modules are essential to core IRC operations and thus not listed above. You can nevertheless still remove these, but doing so demands special precautions to avoid degrading the user experience. At present, the only such module is networks, whose library ERC always loads anyway.

Local Modules

All modules operate as minor modes under the hood, and some newer ones may be defined as buffer-local. These so-called “local modules” are a work in progress and their behavior and interface are subject to change. As of ERC 5.5, the only practical differences are as follows:

  1. “Control variables,” like erc-sasl-mode, retain their values across IRC sessions and override erc-module membership when influencing module activation.
  2. Removing a local module from erc-modules via Customize not only disables its mode but also kills its control variable in all ERC buffers.
  3. “Mode toggles,” like erc-sasl-mode and the complementary erc-sasl-enable/erc-sasl-disable pairing, behave differently than their global counterparts.

In target buffers, a local module’s activation state survives “reassociation” by default, but modules themselves always have the final say. For example, a module may reset all instances of itself in its network context upon reconnecting. Moreover, the value of a mode variable may be meaningless in buffers that its module has no interest in. For example, the value of erc-sasl-mode doesn’t matter in target buffers and may even remain non-nil after SASL has been disabled for the current connection (and vice versa).

When it comes to server buffers, a module’s activation state only persists for sessions revived via the automatic reconnection mechanism or a manual ‘/reconnect’ issued at the prompt. In other words, this doesn’t apply to sessions revived by an entry-point command, such as erc-tls, because such commands always ensure a clean slate by looking only to erc-modules. Although a session revived in this manner may indeed harvest other information from a previous server buffer, it simply doesn’t care which modules might have been active during that connection.

Lastly, a local mode’s toggle command, like erc-sasl-mode, only affects the current buffer, but its “non-mode” cousins, like erc-sasl-enable and erc-sasl-disable, operate on all buffers belonging to their connection (when called interactively). And unlike global toggles, none of these ever mutates erc-modules.