Section 177. Every railroad corporation shall provide a uniform hat or cap and distinguishing badge, which shall be worn by all its employees whose duties relate immediately to the transportation of passengers or their baggage. A corporation neglecting to provide such uniform hat or cap and badge shall forfeit one hundred dollars for each week of such neglect; and if such an employee neglects to wear the same when on duty, the corporation which employs him shall for each case of such neglect forfeit twenty-five dollars; and no employee, unless wearing his uniform hat or cap and badge, shall be permitted to exercise any authority or to perform any of the duties of his office.