Changeset 113

Show
Ignore:
Timestamp:
10/14/07 16:31:13 (2 years ago)
Author:
xbright
Message:

Un joli handler

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • randomchat/randomchat.py

    r97 r113  
    1212        if not self.con.auth(jid, pwd): 
    1313            raise Exception('Unable to authenticate as %s' % (jid)) 
     14         
     15        self.con.RegisterHandler('presence', self.presence_handler) 
     16 
    1417 
    1518        while 1: 
    1619            self.con.Process(10) 
    1720 
     21    def presence_handler(self, con, prs): 
     22        print '***********************************************************' 
     23        print prs.getFrom() 
     24        print '***********************************************************' 
    1825 
    1926rc = RandomChat(config.JID, config.PASS, config.SERVER, config.PORT)