~hazon/hazon/hazon-daemon

« back to all changes in this revision

Viewing changes to src/protocol.py

  • Committer: Liel Fridman
  • Date: 2012-07-19 10:08:11 UTC
  • Revision ID: git-v1:0edcf946d89a58e2ee8345db3d5db698fbaf9498
Updating the logging because of twisted getPeer change

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
            self.sendLine('END PUBKEY')
43
43
            ip = self.transport.getPeer()
44
44
            self.usermgr.createUser(ip)
45
 
            self.factory.logger.logMessage('Connection from {0}'.format(self.transport.getPeer()[1]), 'DEBUG')
 
45
            self.factory.logger.logMessage('Connection from {0}'.format(self.transport.getPeer().host), 'DEBUG')
46
46
        else:
47
47
            self.sendLine('600 Too much clients')
48
48
            self.transport.loseConnection()
70
70
                    plugin.plugin_object.execute(self, cline)
71
71
    
72
72
    def connectionLost(self, reason=None):
73
 
        self.usermgr.removeUser(self.transport.getPeer()[1])
 
73
        self.usermgr.removeUser(self.transport.getPeer().host)
74
74
 
75
75
class HazonFactory(Factory):
76
76
    protocol=Hazon