(3)Deprivation of Privileges by escape or attempt to escape. - Every prisoner who at any time escapes or attempts to escape from any custody in which he is lawfully detained after admission to jail, shall, if he is of the casual class, forthwith be removed from that class and placed in the habitual class.