aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--IRC/README.md50
-rwxr-xr-xIRC/bot2.py14
2 files changed, 51 insertions, 13 deletions
diff --git a/IRC/README.md b/IRC/README.md
new file mode 100644
index 0000000..f831785
--- /dev/null
+++ b/IRC/README.md
@@ -0,0 +1,50 @@
+# `//Reaktor/IRC`
+
+This component implements a remote shell daemon that exposes the
+executable files (which may be symlinks) below
+`//Reaktor/public_commands/` through IRC.
+
+## Security
+
+Anyone who has access the the IRC server in question has full access to
+all the exposed executable files. The daemon is executing the commands
+without dropping privileges.
+
+## Quickstart
+
+ #? /bin/sh
+ set -euf
+
+ export nick="$LOGNAME|$HOSTNAME"
+ export host=irc.freenode.org
+ export target='#tincspasm'
+
+ exec Reaktor/IRC/index
+
+## Environment variables
+
+The following environment variables are processed by `//Reaktor/IRC`:
+
+### `nick`
+
+Use a specific nickname.
+
+Optional if the node running `//Reaktor/IRC` is part of Retiolum, in
+which case it defaults to `Name` in `/etc/tinc/retiolum/tinc.conf`.
+
+### `host` and `port`
+
+Connect to a specific IRC server.
+
+Optional if the node running `//Reaktor/IRC` is part of Retiolum, in
+which case it defaults to `supernode` and `6667` (well, it always
+defaults to these two, but they only make science in Retiolum^_^).
+
+### `target`
+
+Join a specific channel.
+
+As always, this does the right thing for properly configured hosts: it
+uses the default `#retiolum`, which is the only really relevant
+channel.^_^
+
diff --git a/IRC/bot2.py b/IRC/bot2.py
index a4a8bf3..170a878 100755
--- a/IRC/bot2.py
+++ b/IRC/bot2.py
@@ -1,18 +1,6 @@
#! /usr/bin/env python
#
-# //Reaktor/IRC
-#
-# export host and port to connect to a specific IRC server
-# defaults to supernode and 6667
-#
-# export nick to use a specific nickname
-# defaults to Name in /etc/tinc/retiolum/tinc.conf
-#
-# export target to join a specific channel
-# defaults to #retiolum
-#
-# Example usage (in your local krebs repository):
-# host=irc.freenode.org nick=$HOSTNAME target=#tincspasm Reaktor/IRC/index
+# //Reaktor/IRC/bot2.py
#
from __future__ import print_function