Yeah, but it doesn't assure that all the pirates are DEAD, which is what is needed. The rules on policing piracy in the past was that any military vessel who apprehended an act of piracy HUNG all the surviving pirates, on the spot. That is a policy that needs to be re-introduced.
And allow private vessels to arm themselves as used to be done.
Wiki