def connectionLost(self, reason): stdout.write("Connection Lost from %s\n" \ % self.transport.getPeer()) targetID = Configuration.getID(self.transport.getPeer().host) if targetID in self.users: del self.users[targetID]
def connectionMade(self): stdout.write("Connection Made from %s\n" \ % self.transport.getPeer()) targetID = Configuration.getID(self.transport.getPeer().host) self.users[targetID] = self self.sendLine("Connection Made. Now, you could send me messages.")