Code of Alabama
Article 1 - Search Warrants.
Section 15-5-17 - Searching of Person Charged With Felony for Weapon or Evidence in Judge's or Magistrate's Presence.

When a person charged with a felony is supposed by the judge or the magistrate before whom he is brought to have upon his person a dangerous weapon or anything which may be used as evidence of the commission of the offense, the judge or the magistrate may direct him to be searched in his presence and such weapon or other thing to be retained, subject to the order of the court in which the defendant may be tried.