158 . It shall be lawful for such officer or other person as aforesaid, within one month after such notice, to tender amends to the party complaining, or to his agent, and to plead such tender in bar to any action, together with other pleas; and if the court shall find the amends sufficient, it shall give judgment for the defendant; and in such case, or in case the plaintiff shall become non-suited, or shall discontinue his action, or judgment shall be given for the defendant, such defendant shall be entitled to costs as in section 157 mentioned :
Provided always that it shall be lawful for such defendant, by leave of the court where such action shall be brought at any time before issue joined, to pay money into court as in other actions. *Officer may tender amends.*