Ted has planned out a bachelor party for Marshall, since he is his best man. Barney wants to offer some input, but Marshall has said that he does not want a stripper at his bachelor party. Barney keeps trying to convince Ted, but Ted doesn't want to hear any of it from Barney. Ted's planned bachelor party involved watching a boxing match and eating large steaks from a cow he bought online. Barney foils this by amazingly getting a stripper into the hotel room (even though Barney thought that they were going to Atlantic City rather than Foxwoods). To make matters worse, the stripper breaks her ankle, causing everyone to miss the boxing match as she must go to the hospital, and then Barney demands that she continue on with the rest of her show, as she wants to do it. The rest of her show causes everyone but Barney to lose their appetite, and to top it all off, they are kicked out of the hotel due to a fire caused by Barney's cigar. Marshall and Ted return to MacLaren's bar, mad that Barney ruined the bachelor party.
Meanwhile, Robin is in an awkward position at Lily's bridal shower, since (under Barney's advice) Robin has gotten her a "battery-powered adult recreational fake penis" (instead of a see-through nightie), and most of Lily's guests are much older family members. Robin tries to stop Lily from opening the gift and finally switches cards with another present to disguise her gift. When Lily opens Robin's gift (which Lily believes to be from her grandmother), Lily is shocked, but then Robin reveals that it was actually her gift, and Lily, as well as the other women, react much more mildly than Robin expected.
Lily and Robin go down to the bar afterwards and are surprised to see Ted and Marshall there. They explain that Barney ruined the bachelor party, and Marshall is even considering not inviting Barney to the wedding. Lily reveals a story: during the summer when the engagement was broken off, Barney, having had enough of Marshall's depression over losing Lily, flew out to San Francisco and told Lily to come back, as he thought they should be together, and that she might lose Marshall forever if she didn't come back. Barney goes on to tell Lily that he cannot keep stealing girls from Marshall forever, implying that he has been trying to provide an opportunity for Lily to return, even going so far as to purchase her a one way airline ticket. At this point, Barney is made co-best man with Ted, and Marshall is happy that Barney cared about their relationship.