IRC
| Schemes | irc://, ircs:// |
| Cargo feature | service-irc |
| Service | https://ircv3.net/ |
| Body formats | text (first is the default) |
| Attachments | no |
| Title length | no title (merged into the body) |
| Body length | 380 characters |
| Body lines | unlimited |
| Request throttle | 20 ms between requests |
| Vendor URLs accepted | no |
URL formats
{schema}://{host}/{targets}
{schema}://{host}:{port}/{targets}
{schema}://{user}@{host}/{targets}
{schema}://{user}@{host}:{port}/{targets}
{schema}://{user}:{password}@{host}/{targets}
{schema}://{user}:{password}@{host}:{port}/{targets}
{schema} is one of irc://, ircs://.
URL tokens
| Token | Meaning | Type | Required | Default | Notes |
|---|---|---|---|---|---|
{host} | Hostname | string | yes | ||
{password} | Password | string | no | secret | |
{port} | Port | int, 1 to 65535 | no | ||
{target_channel} | Target Channel | string | no | prefix # | |
{target_user} | Target User | string | no | prefix @ | |
{targets} | Targets | list | yes | any of target_channel, target_user; separated by / | |
{user} | User | string | no |
Query parameters
| Parameter | Meaning | Type | Default | Notes |
|---|---|---|---|---|
join | Join Channels | bool | yes | |
mode | Auth Mode | choice | server (usually; depends on the URL) | one of znc, server, nickserv, none |
name | Real Name | string | ||
nick | Nickname | string | ||
to | Targets | list | sets {targets} |
The common URL parameters (format, overflow, verify, redirect, cto, rto, retry, wait, store, tag, tz, user, password, port, optional, emojis) apply as well.
Examples
Accepted URLs (tokens are fake):
irc://me@irc.example.com/%23chan
ircs://me@irc.example.com/%23chan
irc://me@irc.example.com/%23chan/@bob
irc://me@irc.example.com/%23zeta/%23alpha/@zed/@amy
irc://me@irc.example.com/%23chan?join=no
irc://me@irc.example.com/chan2?to=%23chan
irc://me@irc.example.com/%23a/@b?to=%23c,@d
irc://me:pw@irc.example.com/%23chan?mode=server
Rejected URLs:
irc://me@irc.example.com/@bob?mode=invalid
Send one from the command line:
mercurio -t 'Backup' -b 'Finished in 42s' 'irc://me@irc.example.com/%23chan'
Notes
IRC (irc://, ircs://): messages to IRC channels and users.
One connection per notification: optional PASS, NICK + USER, wait for the 001 welcome (answering PINGs, retrying taken nicknames up to 3 times), optional ZNC liveness PING, then per channel JOIN (waiting for the server’s confirmation) and one PRIVMSG per non-blank body line, PRIVMSG to each user, QUIT.
Auth modes (?mode=): server (default, PASS), nickserv (PRIVMSG NickServ :IDENTIFY after registration), znc (PASS user:password), none. Known networks (Libera.Chat, SynIRC, EFnet) get TLS / port / mode defaults when no port is given.
Differences with Apprise
- NickServ identification is sent (Apprise clears the password first, so its
nickservmode never identifies). - After the welcome mercurio continues at once instead of draining the MOTD for a quiet period.
- A missing JOIN confirmation is waited for up to the read timeout (30 s) and then ignored, like Apprise after its 6 s join timeout.