diff options
| author | tv <tv@xso> | 2011-09-06 14:46:33 +0200 | 
|---|---|---|
| committer | tv <tv@xso> | 2011-09-06 14:46:33 +0200 | 
| commit | 858bc7c2521a82275c4ba8bf31ed241ad1135686 (patch) | |
| tree | 3c1017aa195f8db70cf740fad347158fb83ae6a5 | |
| parent | 5bb7fdb08dd0f755ddde627f21e0f9a8ebd524ba (diff) | |
//Reaktor/IRC: add the relevant documentation
| -rwxr-xr-x | IRC/bot2.py | 19 | 
1 files changed, 17 insertions, 2 deletions
| diff --git a/IRC/bot2.py b/IRC/bot2.py index 49e8a57..a4a8bf3 100755 --- a/IRC/bot2.py +++ b/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) | 
