示例#1
0
 def availableReceived(self, entity, show=None, statuses=None, priority=0):
     log.msg("Available from %s (%s, %s, pri=%s)" % (
         entity.full(), show, statuses, priority))
     if priority >= 0 and show not in ['xa', 'dnd']:
         scheduling.available_user(entity)
     else:
         log.msg("Marking jid unavailable due to negative priority or "
             "being somewhat unavailable.")
         scheduling.unavailable_user(entity)
示例#2
0
 def onRosterSet(self, item):
     if not item.subscriptionTo and not item.subscriptionFrom and not item.ask:
         log.msg("Subscription of %s is none" % item.jid.userhost()) 
         self.removeItem(item.jid)
         scheduling.unavailable_user(item.jid)
         try:
             u = models.User.update_status(item.jid.userhost(), 'unsubscribed')
         except:
             log.err()
示例#3
0
 def onRosterSet(self, item):
     if not item.subscriptionTo and not item.subscriptionFrom and not item.ask:
         log.msg("Subscription of %s is none" % item.jid.userhost())
         self.removeItem(item.jid)
         scheduling.unavailable_user(item.jid)
         try:
             u = models.User.update_status(item.jid.userhost(),
                                           'unsubscribed')
         except:
             log.err()
示例#4
0
    def availableReceived(self, entity, show=None, statuses=None, priority=0):
        log.msg("Available from %s (%s, %s, pri=%s)" %
                (entity.full(), show, statuses, priority))

        if priority >= 0 and show not in ['xa', 'dnd']:
            scheduling.available_user(entity)
        else:
            log.msg("Marking jid unavailable due to negative priority or "
                    "being somewhat unavailable.")
            scheduling.unavailable_user(entity)
        self._find_and_set_status(entity.userhost(), show)
示例#5
0
    def availableReceived(self, entity, show=None, statuses=None, priority=0):
        log.msg("Available from %s (%s, %s, pri=%s)" %
                (entity.full(), show, statuses, priority))
        if entity.userhost() == JID(config.SCREEN_NAME).userhost():
            return

        if priority >= 0 and show not in ['xa', 'dnd']:
            scheduling.available_user(entity)
        else:
            log.msg("Marking jid unavailable due to negative priority or "
                    "being somewhat unavailable.")
            scheduling.unavailable_user(entity)
示例#6
0
 def unavailableReceived(self, entity, statuses=None):
     log.msg("Unavailable from %s" % entity.full())
     scheduling.unavailable_user(entity)
示例#7
0
 def onError(self, msg):
     log.msg("Error received for %s: %s" % (msg['from'], msg.toXml()))
     scheduling.unavailable_user(JID(msg['from']))
示例#8
0
 def cb():
     scheduling.unavailable_user(entity)
示例#9
0
 def cb():
     scheduling.unavailable_user(entity)
示例#10
0
 def onError(self, msg):
     log.msg("Error received for %s: %s" % (msg['from'], msg.toXml()))
     scheduling.unavailable_user(JID(msg['from']))
示例#11
0
 def unavailableReceived(self, entity, statuses=None):
     log.msg("Unavailable from %s" % entity.full())
     scheduling.unavailable_user(entity)