(b) Upon proper proof of the existence of a condition that is in the opinion of the court, such as to constructively evict the tenant from a portion of the premises occupied by him, or is or is, likely to become, dangerous to life, health, or safety, the court before which the case is pending may stay proceedings to dispossess the tenant for non-payment of rent, or any action for rent or rental value.
(c) The court shall in no case grant a stay where it appears that the condition against which the notice or order is directed has been created by the wilful or negligent act of the tenant or his agent. Such stay shall continue in force, until an order shall be made by the court vacating it, but no order vacating such stay shall be made, except upon three days' notice of hearing to the tenant, or respondent, or his attorney, and proof that such notice or order has been complied with. 2. The tenant or respondent shall not be entitled to the stay unless he shall deposit with the clerk of the court the rent then due, which shall, for the purposes of this section, be deemed the same as the tenant was liable for during the preceding month or such as is reserved as the monthly rent in the agreement under which he obtained possession of the premises. The stay may be vacated upon three days' notice upon failure to deposit with the clerk the rent within five days after it is due, during the pendency of the proceeding or action. 3. During the continuance of the stay, the court may direct, in its discretion, upon three days notice to all parties, the release to a contractor or materialman of all or such part of the moneys on deposit as shall be sufficient to pay bills properly presented by such contractor or materialman for the maintenance of and necessary repairs to the building (including but not limited to payments for fuel, electricity, gas, janitorial services and repairs necessary to remove violations), upon a showing by the tenant that the landlord is not meeting his legal obligations therefor or direct such release to a municipal department to pay bills and expenses for such maintenance and repairs upon a showing that the landlord did not meet his legal obligation to provide such maintenance or perform repairs and that the department incurred expenses therefor. Upon the entry of an order vacating the stay the remaining money deposited shall be paid to the plaintiff or landlord or his duly authorized agent. 4. Neither party shall be entitled to any costs in any proceeding or action wherein the stay shall be granted except that costs may be awarded against the tenant or defendant in the discretion of the court in the event the condition complained of shall be found to be due to the wilful act of the tenant or defendant, such costs, however, not to exceed the sum of twenty-five dollars.