log_channel.py
changeset 140 6db2527b67cf
parent 139 9c7769850195
child 141 65c98c9e1716
--- a/log_channel.py	Sun Sep 13 00:49:55 2009 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-"""
-    A channel represents a series of log events, stored in some log source
-"""
-
-import log_search
-
-class LogChannel (object) :
-    """
-        A single IRC channel, logged to some specific place
-    """
-
-    def __init__ (self, id, network, name, source) :
-        """
-            Initialize this channel from the given identifier key, network name, channel name, and LogSource
-        """
-        
-        # store
-        self.id = id
-        self.network = network
-        self.name = name
-        self.source = source
-
-        # bind source
-        self.source.bind_channel(self)
-    
-    @property
-    def title (self) :
-        """
-            Title is 'Network - #channel'
-        """
-
-        return "%s - %s" % (self.network, self.name)
-    
-    def search (self, query) :
-        """
-            Perform a search on this channel, returning a sequence of LogLines
-        """
-
-        return log_search.index.search_simple(self, query)
-
-    def __str__ (self) :
-        """
-            Returns self.title
-        """
-
-        return self.title
-
-    def __repr__ (self) :
-        """
-            Uses self.id
-        """
-
-        return "LogChannel(%s)" % (self.id, )
-