function getNextEntryFromPlaybook (ofType, playbook) {
    if (playbook.length == 0) {
        return false;
    }
    if (playbook[0].from == ofType) {
        return playbook.shift();
    }
    return false;
}
runs a socket.write
@param socket
@param test
@param playbook