Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
Russ Garrett e0013fbf9f
Docs updates
vor 7 Jahren
examples Docs updates vor 7 Jahren
httplistener Improved HTTP logging vor 7 Jahren
tcplistener Fix sending to channels with keys vor 7 Jahren
.travis.yml Add version info vor 7 Jahren
LICENSE License and readme vor 7 Jahren
README.md Docs updates vor 7 Jahren
auth.go Handle mode characters in NAMES correctly vor 7 Jahren
command.go Add auth for commands vor 7 Jahren
main.go Print error on TCP listener failure vor 7 Jahren

README.md

irccat

Build Status

A reimplementation of irccat, the original ChatOps tool, in Go.

irccat lets you easily send events to IRC channels from scripts and other applications.

Installation

Download the latest release from Github, put the example config in /etc/irccat.json or the local directory, and run!

 TCP → IRC

Just cat a string to the TCP port - it’ll be sent to the first channel defined in your channel list:

echo "Hello world" | nc -q 0 irccat-host 12345

Or specify a channel or nickname to send to:

echo "#channel Hello world" | nc -q 0 irccat-host 12345
echo "@nick Hello world" | nc -q 0 irccat-host 12345

IRC formatting is supported (see a full list of codes):

echo "Status is%GREEN OK %NORMAL" | nc -q 0 irccat-host 12345a

HTTP → IRC

There’s a simple HTTP endpoint for sending messages:

curl -X POST http://irccat-host:8045/send -d
    '{"to": "#channel", "body": "Hello world"}

There are also endpoints which support app-specific webhooks, currently:

  • Grafana alerts can be sent to /grafana. They will be sent to the channel defined in http.listeners.grafana.

Note that there is (currently) no authentication on the HTTP endpoints, so you should make sure you firewall them from the world.

IRC → Shell

You can use irccat to execute commands from IRC:

?commandname string of arguments

This will call your commands.handler script with the command-line arguments:

nickname [channel] respond_to commandname [string of arguments]

irccat will only recognise commands from users in private message if the user is joined to commands.auth_channel defined in the config.

Full list of differences from RJ/irccat

  • Supports TLS connections to IRC servers.
  • HTTP endpoint handlers.
  • Doesn’t support !join, !part commands, but does automatically reload the config and join new channels.
  • Arguments are passed individually to the command handler script, rather than in one string as a single argument.