From aae296e484fb5721efd2e39bf3db13407f131d4e Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 6 Sep 2011 14:46:33 +0200 Subject: //Reaktor/IRC: add the relevant documentation --- Reaktor/IRC/bot2.py | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'Reaktor') 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) -- cgit v1.2.3