Name

irkerd — relay for shipping notifications to IRC servers

Synopsis

irkerd [-d debuglevel] [-l logfile] [-n nick] [-p password] [-V] [-h]

DESCRIPTION

irkerd is a specialized write-only IRC client intended to be used for shipping notification messages to IRC channels. The use case in mind when it was designed was broadcasting notifications from commit hooks in version-control systems.

irkerd is a socket server that listens on for UDP or TCP packets on port 6659 for textual request lines containing JSON objects and terminated by a newline. Each JSON object must have two members: "to" specifying a destination or destination list, and "privmsg" specifying the message text. Examples:

{"to":"irc://chat.freenode.net/git-ciabot", "privmsg":"Hello, world!"}
{"to":["irc://chat.freenode.net/#git-ciabot","irc://chat.freenode.net/#gpsd"],"privmsg":"Multichannel test"}
{"to":"irc://chat.hypothetical.net:6668/git-ciabot", "privmsg":"Hello, world!"}

If the channel part of the URL does not have one of the prefix characters #, &, or +, a # will be prepended to it before shipping - unlessthe channel part has the suffix ",isnick" (which is unconditionally removed).

The host part of the URL may have a port-number suffix separated by a colon, as shown in the third example; otherwise irkerd sends messages to the the default 6667 IRC port of each server.

An empty message is legal and will cause irkerd to join the target channels without actually emitting a message. This may be useful for advertising that an instance is up and running, or for joining a channel to log its traffic.

OPTIONS

irkerd takes the following options:

-d

Takes a following value, setting the debugging level from it. This option will generally only be of interest to developers; consult the source code for details.

-l

Takes a following filename, logs traffic to that file. Each log line consists of three |-separated fields; a numeric timestamp in Unix time, the FQDN of the sending server, and the message data.

-n

Takes a following value, setting the nick to be used. If the nick contains a numeric format element (such as %03d) it is used to generate suffixed fallback names in the event of a nick collision.

-p

Takes a following value, setting a nickserv password to be used. If given, this password is shipped to authenticate the nick on receipt of a welcom message.

-V

Write the program version to stdout and terminate.

-h

Print usage instructions and terminate.

LIMITATIONS

Requests via UDP optimizes for lowest latency and network load by avoiding TCP connection setup time; the cost is that delivery is not reliable in the face of packet loss.

An irkerd instance with a publicly-accessible request socket could complicate blocking of IRC spam by making it easy for spammers to submit while hiding their IP addresses; the better way to deploy, then, is on places like project-hosting sites where the irkerd socket can be visible from commit-hook code but not exposed to the outside world. Priming your firewall with blocklists of IP addresses known to spew spam is always a good idea.

The absence of any option to set the service port is deliberate. If you think you need to do that, you have a problem better solved at your firewall.

IRC has a message length limit of 510 bytes; generate your privmsg attribute values with appropriate care.

IRC ignores any text after an embedded newline. Be aware that irkerd will turn payload strings with embedded newlines into multiple IRC sends to avoid having message data discarded.

SEE ALSO

irkerhook(1),

AUTHOR

Eric S. Raymond . See the project page at http://www.catb.org/~esr/irker for updates and other resources, including an installable repository hook script. The implementation uses the Python IRC library by Joe Rosdahl and Jason R. Coombs.