Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugal-tweak.git;a=commitdiff;h=2081acc74014526be8ea85f336c97fb021397277

commit 2081acc74014526be8ea85f336c97fb021397277
Author: bouleetbil <bouleet...@frogdev.info>
Date:   Sun Sep 5 00:27:47 2010 +0200

*chan is a parameter for join frugalware.fr and hu

diff --git a/PyUtils/irc.py b/PyUtils/irc.py
index 3d9ff17..b422b66 100644
--- a/PyUtils/irc.py
+++ b/PyUtils/irc.py
@@ -99,12 +99,12 @@ class CursesUI:


class PythonIRC:
-  def __init__(self):
+  def __init__(self,channel="frugalware"):
self.server = "irc.freenode.net"
self.port = 6667
self.nick = "FrugalUser"
self.realname = "FrugalControlCenter"
-    self.channel = "#frugalware"
+    self.channel = "#"+channel
self.usercmd = re.compile('^/(\w+)( (.*))?$')
self.usermsg = re.compile('^(#?\w+)( (.*))?$')
self.svrmsg = re.compile('^:([a-zA-Z0-9\.]+) [0-9]+ ' + self.nick + '(.*)')
@@ -221,7 +221,7 @@ def usage():
print("USAGE: " + sys.argv[0] + " server port nick realname")

if (__name__ == "__main__"):
-  client = PythonIRC()
+  client = PythonIRC(channel=sys.argv[1])
cursesui = CursesUI(client)
# Event loop happens ... need more graceful way
cursesui.close()
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to