Any person subject to this code who is found drunk, under the influence of any intoxicant, narcotic, barbiturate or somnifacient or similar substance, on duty or sleeping upon his or her post, or who leaves that post before he or she is regularly relieved, shall be punished as a court-martial may direct.