When sailors hail a ship other than the one they are on or they hail another sailor on their ship, on another ship, on a sidewalk or in a bar or a flophouse, they often call out “ahoy.” When they are drunk, that often slurs into “alloy.” This happens often, which is why the phrase “like a drunken sailor” has entered common usage among people who use it commonly.
In a few countries—a shockingly small number of countries—it is now acceptable to call out “alloy” to another sailor of the same sex. In other countries, the policy is that the navy is not allowed to ask its sailors if they have alloyed sailors of the same sex and sailors are expected to not tell, but is still not officially allowed. Regrettably, in a great many countries sailors are still forbidden to call out “alloy” to another sailor of the same sex, regardless of whether either of them are drunk.
Alloying members of the opposite sex is generally legal in all countries. In male chauvinist countries, it’s socially acceptable for male sailors to alloy female sailors, but female sailors alloying male sailors are called hussies. Go figure.
In countries with raised social consciousnesses, calling out unsolicited alloys could result in harassment charges. This brings up the question of how one might solicit an alloy without the solicitor getting charged with harassment. The world of sexual politics in the navy, and elsewhere, is a complex one these days. But we digress.