[Pymoul-svn] SF.net SVN: pymoul: [294] pymoul/trunk/src/moul
Status: Alpha
Brought to you by:
tiran
From: <ti...@us...> - 2007-05-24 22:50:20
|
Revision: 294 http://pymoul.svn.sourceforge.net/pymoul/?rev=294&view=rev Author: tiran Date: 2007-05-24 15:50:20 -0700 (Thu, 24 May 2007) Log Message: ----------- Added more official DRC and Cyan members Added filter for non important people Modified Paths: -------------- pymoul/trunk/src/moul/chatrelay/__init__.py pymoul/trunk/src/moul/chatrelay/io.py pymoul/trunk/src/moul/chatrelay/ircclient.py pymoul/trunk/src/moul/file/chatlog.py Property Changed: ---------------- pymoul/trunk/src/moul/chatrelay/__init__.py pymoul/trunk/src/moul/chatrelay/io.py pymoul/trunk/src/moul/chatrelay/ircclient.py Modified: pymoul/trunk/src/moul/chatrelay/__init__.py =================================================================== --- pymoul/trunk/src/moul/chatrelay/__init__.py 2007-05-24 17:53:52 UTC (rev 293) +++ pymoul/trunk/src/moul/chatrelay/__init__.py 2007-05-24 22:50:20 UTC (rev 294) @@ -18,5 +18,5 @@ """ """ __author__ = "Christian Heimes" -__version__ = "$Id: __init__.py 108 2007-01-31 14:46:54Z tiran $" -__revision__ = "$Revision: 108 $" +__version__ = "$Id$" +__revision__ = "$Revision$" Property changes on: pymoul/trunk/src/moul/chatrelay/__init__.py ___________________________________________________________________ Name: svn:keywords - 'Id Revision' + Id Revision Modified: pymoul/trunk/src/moul/chatrelay/io.py =================================================================== --- pymoul/trunk/src/moul/chatrelay/io.py 2007-05-24 17:53:52 UTC (rev 293) +++ pymoul/trunk/src/moul/chatrelay/io.py 2007-05-24 22:50:20 UTC (rev 294) @@ -18,12 +18,11 @@ """ """ __author__ = "Christian Heimes" -__version__ = "$Id: __init__.py 108 2007-01-31 14:46:54Z tiran $" -__revision__ = "$Revision: 108 $" +__version__ = "$Id$" +__revision__ = "$Revision$" import os -from moul.file.chatlog import ChatlogParser from moul.file.chatlog import * class NullFormatter(object): @@ -36,16 +35,18 @@ """Formatter for MOUL """ - def __init__(self, skipprivate=True): + def __init__(self, skipprivate=False, onlyimportant=False): self.skipprivate = skipprivate + self.onlyimportant = onlyimportant def format(self, msg): - print msg.typ, msg if not msg: return None typ = getattr(msg, 'typ', CHAT_UNKNOWN) important = getattr(msg, 'important', False) - + + if self.onlyimportant and not important: + return None if self.skipprivate and typ & CHAT_PRIVMSG: return None elif typ == CHAT_PRIVMSGTO: @@ -54,7 +55,7 @@ msg = "<- %s" % msg elif typ == CHAT_ACTION: msg = "* %s" % msg - if important: + if not self.onlyimportant and important: msg = "%B%s" % msg return str(msg) Property changes on: pymoul/trunk/src/moul/chatrelay/io.py ___________________________________________________________________ Name: svn:keywords - 'Id Revision' + Id Revision Modified: pymoul/trunk/src/moul/chatrelay/ircclient.py =================================================================== --- pymoul/trunk/src/moul/chatrelay/ircclient.py 2007-05-24 17:53:52 UTC (rev 293) +++ pymoul/trunk/src/moul/chatrelay/ircclient.py 2007-05-24 22:50:20 UTC (rev 294) @@ -20,8 +20,8 @@ Partly based on Buildbot's IRC support """ __author__ = "Christian Heimes" -__version__ = "$Id: __init__.py 108 2007-01-31 14:46:54Z tiran $" -__revision__ = "$Revision: 108 $" +__version__ = "$Id$" +__revision__ = "$Revision$" import sys import os @@ -271,6 +271,7 @@ p = None readerClass = LogFileReader writerClass = MessageWriter + formatter = MOULLogFormatter(skipprivate=False, onlyimportant=False) def __init__(self, nickname, channel, realname=None, username=None, serverpasswd=None, nickpasswd=None, adminpasswd=None): @@ -300,7 +301,7 @@ self.adminpasswd) p.factory = self p.reader = self.readerClass(chatlog) - p.writer = self.writerClass(p, self.channel, formatter=MOULLogFormatter(False)) + p.writer = self.writerClass(p, self.channel, formatter=self.formatter) self.p = p return p Property changes on: pymoul/trunk/src/moul/chatrelay/ircclient.py ___________________________________________________________________ Name: svn:keywords - 'Id Revision' + Id Revision Modified: pymoul/trunk/src/moul/file/chatlog.py =================================================================== --- pymoul/trunk/src/moul/file/chatlog.py 2007-05-24 17:53:52 UTC (rev 293) +++ pymoul/trunk/src/moul/file/chatlog.py 2007-05-24 22:50:20 UTC (rev 294) @@ -53,9 +53,17 @@ CHAT_ACTION = 1 << 6 # users -USER_CYAN = ['gregbert', 'greydragon'] -USER_DRC = ['Marie Sutherland', 'Douglas Sharper', 'Nick White', - 'Dr. Kodama', 'Victor Laxman', 'Michael Engberg'] +USER_CYAN = [ + 'gregbert', 'greydragon', 'Rand Miller', 'ResEng B. Mathias', + 'ResEng B.Dreschel', 'ResEng C. Lambert', 'ResEng KJohnson', + 'ResEng 102', 'ResEng 233', + ] +USER_DRC = [ + 'Cate Alexander', 'Dr. Kodama', 'Marie Sutherland', 'Michael Engberg', + 'Victor Laxman', 'Wheely', 'Douglas Sharper', 'Phil Henderson', + 'Nick White' + ] + USER_IMPORTANT = USER_CYAN + USER_DRC RE_FLAGS = re.LOCALE This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |