If a pirate got close enough to see that, he was toast. Most pirates preferred smaller, faster, more weatherly (higher pointing to windward) boats.
But that was still the cure for piracy. When that man-of-war rolls into Port Royal, Tortuga or Tripoli and destroys the port and every vessel afloat, piracy becomes a bad business model in a hurry.
No pirate ports, no piracy.