Bladeren bron

Update readme

tags/v0.1.5
Russ Garrett 7 jaren geleden
bovenliggende
commit
6e8222f3c9
No account linked to committer's email address
1 gewijzigde bestanden met toevoegingen van 54 en 2 verwijderingen
  1. 54
    2
      README.md

+ 54
- 2
README.md Bestand weergeven

@@ -1,5 +1,57 @@
1
+# irccat
1 2
 [![Build Status](https://travis-ci.org/irccloud/irccat.svg?branch=master)](https://travis-ci.org/irccloud/irccat)
2 3
 
3
-A hasty re-implementation of [irccat](https://github.com/RJ/irccat) in Go.
4
+A reimplementation of [irccat](https://github.com/RJ/irccat), the
5
+original ChatOps tool, in Go. irccat lets you easily send events
6
+to IRC channels from scripts and other applications.
4 7
 
5
-Supports HTTP POST endpoints as well as the traditional TCP protocol.
8
+## TCP → IRC
9
+Just cat a string to the TCP port - it'll be sent to the first channel
10
+defined in your channel list:
11
+
12
+    echo "Hello world" | nc -q 0 irccat-host 12345
13
+
14
+Or specify a channel or nickname to send to:
15
+
16
+    echo "#channel Hello world" | nc -q 0 irccat-host 12345
17
+    echo "@nick Hello world" | nc -q 0 irccat-host 12345
18
+
19
+IRC formatting is supported (see a full [list of
20
+codes](https://github.com/irccloud/irccat/blob/master/tcplistener/colours.go#L5)):
21
+
22
+    echo "Status is%GREEN OK %NORMAL" | nc -q 0 irccat-host 12345a
23
+
24
+## HTTP → IRC
25
+There's a simple HTTP endpoint for sending messages:
26
+
27
+    curl -X POST http://irccat-host:8045/send -d
28
+        '{"to": "#channel", "body": "Hello world"}
29
+
30
+There are also endpoints which support app-specific webhooks, currently:
31
+
32
+* Grafana alerts can be sent to `/grafana`. They will be sent to the
33
+  channel defined in `http.listeners.grafana`.
34
+
35
+Note that there is (currently) no authentication on the HTTP endpoints,
36
+so you should make sure you firewall them from the world.
37
+
38
+## IRC → Shell
39
+You can use irccat to execute commands from IRC:
40
+
41
+    ?commandname arguments
42
+
43
+This will call your `commands.handler` script with the command-line
44
+arguments:
45
+
46
+    nickname, [channel], respond_to, commandname, [arguments]
47
+
48
+irccat will only recognise commands from users in private message if
49
+the user is joined to `commands.auth_channel` defined in the config.
50
+
51
+## Full list of differences from RJ/irccat
52
+* Supports TLS connections to IRC servers.
53
+* HTTP endpoint handlers.
54
+* Doesn't support !join, !part commands, but does automatically reload
55
+  the config and join new channels.
56
+* Arguments are passed individually to the command handler script,
57
+  rather than in one string as a single argument.

Laden…
Annuleren
Opslaan