Trouble with wireless relay control project

      // Print the name of each button 
      int i = num_buttons;
      while (i--)
      {
        if ( ! ( payload.buttons & _BV(i) ) )
        {
          printf("%s ",button_names[i]);
        }
      }

In here, in addition to printing the button name, set a flag to true if the button of interest is pressed/printed.

      printf("\r\n");
    }
}

In between the curly braces is the part that is "after all the stuff with the radio traffic being dealt with", so that is where you put the code to do whatever you want to do, based on the flag being set/cleared.