Example #1
0
def SendReplaceCustomer(numORidurl, doAck=False):
    """
    Send "FireContact" packet to Central server to remove a customer.
    This man will need to find a new supplier.
    Central server will do that automatically.
    """
    if isinstance(numORidurl, str):
        idurl = numORidurl
    else:
        idurl = contacts.getCustomerID(numORidurl)
    if not idurl:
        dhnio.Dprint(2, "central_service.SendReplaceCustomer ERROR customer not found")
        return None
    dhnio.Dprint(4, "central_service.SendReplaceCustomer [%s]" % nameurl.GetName(idurl))
    data = 'C\n'+idurl+'\n'+str(contacts.numberForCustomer(idurl))
    ret = send2central(commands.FireContact(), data, doAck)
    events.notify('central_service', 'sent request to dismiss customer %s' % nameurl.GetName(idurl))
    return ret
Example #2
0
def HandleCustomersAck(ackpacket):
    Num = contacts.numberForCustomer(ackpacket.OwnerID)
    dhnio.Dprint(8, "identitypropagate.HandleCustomerAck ")
Example #3
0
def HandleSingleCustomer(ackpacket):
    Num = contacts.numberForCustomer(ackpacket.OwnerID)