In case of war no pilot shall bring in or furnish supplies to any armed vessel belonging to an enemy at war with the United States or carry out any armed vessel to that enemy, without being ordered to do so by the constituted authorities of the United States. Every pilot violating this section shall forfeit his license and be disqualified forever from acting as a pilot. If at any time the President of the United States or the Governor of the State shall prohibit the furnishing with supplies, or the bringing in or the carrying out of any vessel belonging to any nation or state or to a subject of any nation or state, every pilot shall comply with every prohibition, on pain of incurring the same penalty and punishment as for like offenses in time of war.