From: Eric S. Raymond Date: Sun, 26 Aug 2012 03:35:12 +0000 (-0400) Subject: Still passes test. X-Git-Tag: 1.0~128 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=de1d937369255d58f4fa16af990b179f9041c7c6;p=irker.git Still passes test. --- diff --git a/irker.py b/irker.py index 7c04a68..ccdb7db 100755 --- a/irker.py +++ b/irker.py @@ -39,7 +39,8 @@ class Session(): self.servername = host self.channel = parsed.path.lstrip('/') self.port = int(port) - #self.server = self.irc.server() + self.server = self.irc.server() + print "connecting: server=%s port=%s name=%s" % (self.servername, self.port, self.name()) #self.server.connect(self.servername, self.port, self.name()) Session.count += 1 def enqueue(self, message): @@ -60,8 +61,8 @@ class Session(): def ship(self, channel, message): "Ship a message to the channel." print "%s: %s" % (channel, message) - # self.server.connection.join(chaannel) - # self.server.privmsg(channel, message) + #self.server.connection.join(chaannel) + #self.server.privmsg(channel, message) class Irker: "Persistent IRC multiplexer." @@ -97,7 +98,7 @@ class Irker: channel = request['channel'] message = request['message'] if channel not in self.sessions: - self.sessions[channel] = Session(self.irc.server(), channel) + self.sessions[channel] = Session(self.irc, channel) self.sessions[channel].enqueue(message) if __name__ == '__main__':