'Add or replace all features for a JID/node combination.
The data parameter should include:
features -- The new set of supported features.'

def set_features(self, jid, node, ifrom, data):

    with self.lock:
        features = data.get('features', set())
        self.add_node(jid, node)
        self.get_node(jid, node)['info']['features'] = features
