summaryrefslogtreecommitdiffstats
path: root/Reaktor
diff options
context:
space:
mode:
authortv <tv@xso>2011-09-06 14:46:33 +0200
committertv <tv@xso>2011-09-06 14:46:33 +0200
commitaae296e484fb5721efd2e39bf3db13407f131d4e (patch)
treeb78546fff87d25fa10bb1734f685e99c990a8679 /Reaktor
parent9250247e57255ab9886fd15107f4f5ec31a0a888 (diff)
//Reaktor/IRC: add the relevant documentation
Diffstat (limited to 'Reaktor')
-rwxr-xr-xReaktor/IRC/bot2.py19
1 files changed, 17 insertions, 2 deletions
diff --git a/Reaktor/IRC/bot2.py b/Reaktor/IRC/bot2.py
index 49e8a57f..a4a8bf33 100755
--- a/Reaktor/IRC/bot2.py
+++ b/Reaktor/IRC/bot2.py
@@ -1,4 +1,19 @@
#! /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
+#
from __future__ import print_function
from irclib import SimpleIRCClient, ServerConnectionError, is_channel
@@ -100,10 +115,10 @@ def getconf1(x, path):
def main():
name = getconf1('Name', '/etc/tinc/retiolum/tinc.conf')
+ nick = str(env.get('nick', name))
host = str(env.get('host', 'supernode'))
port = int(env.get('port', 6667))
- nick = str(env.get('nick', name))
- target = str(env.get('target', '#tincspasm'))
+ target = str(env.get('target', '#retiolum'))
print('====> irc://%s@%s:%s/%s' % (nick, host, port, target))
client = IRCBot(target)