Neil Patrick Harris may not be a comedian like Jimmy Kimmel, but the star of the hit sitcom “How I Met Your Mother” still managed to get all the laughs at today’s CBS upfront presentation for advertisers at Carnegie Hall.

Harris adapted his “Mother” character Barney Stinson’s legendary “Bro Code” for the event, sharing a special Upfront Bro Code of Conduct for the CBS party being held for advertisers following the presentation.

According to Harris, Article 22 states that “there is no law that prohibits a woman from being a bro. Or, I guess a man from being a ho. In fact, I think I can spot some male hoes here at Carnegie Hall today – I’m looking at you Mr. Cool J.”

Harris took another poke at Safer, with Article 169, saying that “a bro must never use [‘The Mentalist’ star] Simon Baker as his wingman. Come on bros, he’s too damn hot. It’s too much of a gamble. You want to go with someone safer, like, well, [Morley] Safer.”

Like Kimmel, Harris also got in a (subtle) dig about his network’s programming choices. For Article 157 of the Upfront Bro Code, he said that “a good way for a bro to get a girl in the mood at the CBS party, is to subtly mention the dirtiest sounding CBS shows. These include, but are not limited to, ‘The Big Bang Theory,’ and 69 Minutes. 69 minutes, right? No? Damn. God, I wish ‘The Unit’ was still on the schedule.”

Earlier in the day, CBS confirmed that the military-themed series had been cancelled.