(A) Upon conviction of an offense in which a weapon was used or possessed by the offender, any weapon seized shall be confiscated by the trial court.
(B) Any stolen weapon so confiscated, when no longer needed for evidentiary purposes, shall be returned to the person entitled to possession, if known. After the disposition of a criminal case or in any criminal case where a final judgment in the case was not entered due to the death of the defendant, and when a confiscated weapon is no longer needed for evidentiary purposes, and when in due course no legitimate claim has been made for the weapon, the court may transfer the weapon to the sheriff of the county who may proceed to destroy it, or may in its discretion order the weapon preserved as property of the governmental body whose police agency seized the weapon, or may in its discretion order the weapon to be transferred to the Illinois State Police for use by the crime laboratory system, for training purposes, or for any other application as deemed appropriate by the Department. If, after the disposition of a criminal case, a need still exists for the use of the confiscated weapon for evidentiary purposes, the court may transfer the weapon to the custody of the State Department of Corrections for preservation. The court may not order the transfer of the weapon to any private individual or private organization other than to return a stolen weapon to its rightful owner. The provisions of this section shall not apply to violations of the Fish and Aquatic Life Code or the Wildlife Code. Confiscation of weapons for Fish and Aquatic Life Code and Wildlife Code violations shall be only as provided in those Codes.
(C) Any mental hospital that admits a person as an inpatient pursuant to any of the provisions of the Mental Health and Developmental Disabilities Code shall confiscate any firearms in the possession of that person at the time of admission, or at any time the firearms are discovered in the person's possession during the course of hospitalization. The hospital shall, as soon as possible following confiscation, transfer custody of the firearms to the appropriate law enforcement agency. The hospital shall give written notice to the person from whom the firearm was confiscated of the identity and address of the law enforcement agency to which it has given the firearm. The law enforcement agency shall maintain possession of any firearm it obtains pursuant to this division for a minimum of 90 days. Thereafter, the firearm may be disposed of pursuant to the provisions of division (B) of this section.
(ILCS Ch. 720, Act 5, § 24-6)