(a) For the purposes of this section:
(1) “Code enforcement agency” means either a code enforcement department as defined by 87 CSR 7-2, as may be amended, or an enforcement agency as permitted by subsection (c) of this section.
(2) “Code enforcement agency official” means any lawful agent of a code enforcement agency.
(3) “Owner” or “landowner” means a person who individually or jointly with others:
(A) Has legal title to the property, with or without actual possession of the property;
(B) Has charge, care or control of the property as owner or agent of the owner;
(C) Is an executor, administrator, trustee or guardian of the estate of the owner;
(D) Is the agent of the owner for the purpose of managing, controlling or collecting rents; or
(E) May control or direct the management or disposition of the property.
(4) “Unsafe, unsanitary, dangerous or detrimental to the public safety or welfare” means:
(A) Any door, aisle, passageway, stairway, exit or other means of egress that does not conform to the approved building or fire code of the jurisdiction as related to the requirements for existing buildings;
(B) The walking surface of any aisle, passageway, stairway, exit or other means of egress is so warped, worn loose, torn or otherwise unsafe as to not provide safe and adequate means of egress;
(C) Any portion of a dwelling, building, structure or appurtenance that has been damaged by fire, earthquake, wind, flood, deterioration, neglect, abandonment, vandalism or by any other cause to an extent that it is likely to partially or completely collapse, or to become detached or dislodged;
(D) Any portion of a structure or building, or any member, appurtenance or ornamentation on the exterior that is not of sufficient strength or stability, or is not so anchored, attached or fastened in place so as to be capable of resisting natural or artificial loads of one and one-half the original designed value;
(E) The dwelling, building or structure, or part of the building or structure, because of dilapidation, deterioration, decay, faulty construction, the removal or movement of some portion of the ground necessary for the support, or for any other reason, is likely to partially or completely collapse, or some portion of the foundation or underpinning of the building or structure is likely to fail or give way;
(F) The dwelling, building or structure, or any portion, is clearly unsafe for its use;
(G) The dwelling, building or structure is neglected, damaged, dilapidated, unsecured or abandoned so as to become an attractive nuisance to children, becomes a harbor for vagrants, criminals, criminal activity or enables persons to resort to the dwelling, building or structure for committing a nuisance or an unlawful act;
(H) Any dwelling, building or structure constructed, exists or maintained in violation of any specific requirement or prohibition applicable to any dwelling, building or structure provided by the approved building or fire code of the jurisdiction or of any law or ordinance that presents either a substantial risk of fire, building collapse or any other threat to life and safety;
(I) A dwelling, building or structure, used or intended to be used for dwelling purposes, because of inadequate maintenance, dilapidation, decay, contamination by any hazardous substance or material including, but not limited to, substance resulting from the illegal manufacture of drugs, damage, faulty construction or arrangement, inadequate light, ventilation, mechanical or plumbing system, or otherwise, is determined by the code enforcement agency to be unsanitary, unfit for human habitation or in such a condition that is likely to cause sickness or disease;
(J) Any dwelling, building or structure, because of a lack of sufficient or proper fire resistance-rated construction, fire protection systems, electrical system, fuel connections, mechanical system, plumbing system or other cause, is determined by the code official to be a threat to life or health; or
(K) Any portion of a building that remains on a site after the demolition or destruction of the building or structure, or whenever any building or structure is abandoned.
(b) Plenary power and authority are hereby conferred upon every municipality to adopt ordinances regulating the repair, alteration or improvement, or the vacating and closing or removal or demolition, or any combination, of any structure, dwelling or building, whether used for human habitation or not, that is unsafe, unsanitary, dangerous or detrimental to the public safety or welfare.
(c) The governing body in formally adopting any ordinance under this section shall designate the enforcement agency, which shall consist of the code enforcement agency as provided by the state building code and authorized by section five-b, article three, chapter twenty-nine of this code and section thirteen, article twelve, chapter eight of this code; or municipal officials as may otherwise be authorized by this code; or municipal officials or agents as authorized by rules promulgated by the State Fire Commission and approved by the Legislature; or municipal officials or agents as may otherwise be authorized by the State Fire Commission. Notwithstanding any provision of this code to the contrary, for the purposes of this section any municipality that has not adopted the state building code may designate an enforcement agency consisting of the mayor, the municipal engineer or building inspector and one member at large, to be selected by and to serve at the will and pleasure of the mayor, and the ranking health officer and fire chief who shall serve as ex officio members of the enforcement agency.
(d) Any ordinance adopted under the provisions of this section must provide fair and equitable rules of procedure and any other procedures required by law or necessary and appropriate to guide the code enforcement agency, or its officials, in the investigation of any structure, dwelling or building conditions, and in any corrective action taken by the code enforcement agency.
(e) When a code enforcement agency official enters the premises of the property for investigating or inspecting any structure, dwelling or building, the investigation shall be performed to minimize the inconvenience to the owner or persons in possession and shall be consistent with the following:
(1) Except in exigent circumstances and as permitted by law, the enforcement agency shall provide reasonable advance notice to the owner and request permission from the owner to enter the property.
(2) If the owner cannot be located after reasonable inquiry by the code enforcement agency as required by this section, or if the owner refuses entry, the code enforcement agency may obtain an administrative search warrant from either the municipal court or the magistrate court located in the jurisdiction of the municipality or county where the structure, dwelling or building is located. Before obtaining an administrative search warrant, a code enforcement agency official is required to make a sworn statement and prima facie case showing that the code enforcement agency was unable to gain access to the structure, dwelling or building after reasonable and good faith efforts, and that there is a legitimate and substantial safety concern involving the structure, dwelling or building that supports the requested entry.
(3) If granted by the court, and if the owner can be located, the code enforcement agency shall provide the owner a copy of the administrative search warrant five days before entering the property. If applicable, the code enforcement agency shall also provide the same notice to any tenant or other person in possession of the structure, dwelling or building.
(4) Entry is for the sole purpose of inspection of the structure, dwelling or building for unsafe or unsanitary conditions and not for the purpose of criminal prosecution or gathering evidence for use in any criminal charge or proceeding unrelated to the unsafe or unsanitary condition of the structure, dwelling or building.
(f) The governing body of every municipality has plenary power and authority to adopt an ordinance providing for the vacating, closing, removal or demolition of any dwelling, structure or building by the municipality in the absence of owner agreement or court order: Provided, That the ordinance requires the code enforcement agency to provide lawful notice to and undertake reasonable efforts to seek agreement from the owner before taking any action permitted by this section and shall comply with the requirements set forth in this subsection:
(1) Any ordinance adopted under this subsection applies only to dwellings, structures or buildings which meet the definition of unsafe, unsanitary, dangerous or detrimental to the public safety or welfare as set forth in:
(A) Paragraph (C), (E) or (H), subdivision (4), subsection (a) of this section; or
(B) Paragraph (F), (G), (I) or (K), subdivision (4), subsection (a) of this section: Provided, That the dwelling, building or structure is vacant, abandoned or has been lawfully declared unfit for human habitation; and the reasonable estimated cost of repair, rehabilitation or corrective action exceeds the fair market value of the dwelling, building or structure.
(2) Any ordinance adopted under this subsection must provide for the following:
(A) The code enforcement agency shall produce a written notice containing the date of the last inspection, the name of the inspector, a reasonable description of the unsafe, unsanitary, dangerous, or detrimental condition(s), the corrective measures required, the allotted time to correct the substandard condition(s) and the allotted time the owner has to apply to the circuit court for a temporary injunction or other similar relief restraining action by the enforcement agency.
(B) The notice shall be served upon the owner or landowner by conspicuously posting and attaching a copy of the notice to the subject property, and by serving the notice on the owner or landowner in the same manner as service of a complaint as set forth in subsection (j) of this section.
(C) If the code enforcement agency cannot effect personal service on the owner, a code enforcement agency official shall subscribe a written affidavit, to be maintained for a minimum of two years, that demonstrates the structure, dwelling or building falls within one of the categories set forth in paragraph (A) or (B), subdivision (1), subsection (f) of this section sets forth the basis in reasonable detail including documentation of same, and memorializes the code enforcement agency official’s efforts to contact or get permission for entry and corrective action from the owner; and the code enforcement agency shall publish notice of its intent to enter the property for the purpose of demolition or correction, along with the address of the property, the name of the owner(s) and the date of the proposed action, as a Class II legal advertisement consistent with the requirements of section two, article three, chapter fifty-nine of this code, the first of which shall run at least thirty days before the date of the proposed action by the enforcement agency, and the last being no later than twenty days before the date of the proposed action by the enforcement agency.
(D) If there is no response to the notice by the owner or landowner in the time specified in the notice, then the municipality shall have the authority to proceed in correction or demolition of the subject dwelling, building or structure.
(3) It shall be an absolute defense to any civil action by an owner, landowner or tenant for damages resulting from the closure, demolition or other corrective action taken by a municipality under this section: Provided, That the municipality acted in good faith, can demonstrate that the structure, dwelling or building falls within one of the categories set forth in paragraph (A) or (B), subdivision (1), subsection (f) of this section, the municipality followed the procedures set forth in this subsection and the municipality had adopted the state building code at the time of the closure, demolition or other corrective action occurred.
(4) Any ordinance adopted under this subsection must also provide for notice to the owner of the right of the owner to apply to the circuit court for a temporary injunction or other similar relief restraining correction or demolition by the enforcement agency. If the application is made by the owner, a hearing shall be had within twenty days of the application, or as soon as reasonably possible.
(A) Continuances of the hearing provided for in this subdivision may be made for cause only. If a continuance is granted upon request by the owner, the owner is required to pay into court, in the form of a bond, any reasonable and necessary costs related to the property likely to be incurred by the municipality during the continuance.
(B) At the conclusion of a hearing held under this subdivision, if the court finds that the property is unsafe, unsanitary, dangerous, or detrimental to the public safety or welfare, the court shall make and enter an order granting the relief as requested by the municipality. The court may disburse any moneys paid into court by the owner in accordance with this section.
(g) The governing body of every municipality has plenary power and authority to adopt an ordinance requiring the owner of any dwelling or building under determination of the State Fire Marshal, as provided in section twelve, article three, chapter twenty-nine of this code, or under order of the code enforcement agency of the municipality, to pay for the costs of repairing, altering or improving, or of vacating and closing, removing or demolishing any dwelling or building and may file a lien against the real property in question for an amount that reflects all costs incurred by the municipality for repairing, altering or improving, or of vacating and closing, removing or demolishing any dwelling or building.
(h) Every municipality may also institute a civil action in circuit court against the landowner or other responsible party to get an order to take corrective action up to and including demolition of any structure, dwelling or building that is unsafe, unsanitary, dangerous or detrimental to the public safety or welfare; and to recover all reasonable costs and expenses incurred by the municipality with respect to the property and for reasonable attorney fees and court costs incurred in the prosecution of the action:
(1) No fewer than ten days before instituting a civil action as provided in this subsection, the municipality shall send notice to the landowner by certified mail, return receipt requested, advising the landowner of the governing body’s intention to institute such action.
(2) The notice shall be sent to the most recent address of the landowner of record in the office of the assessor of the county where the subject property is located and to any other address for the landowner as may exist on record with the municipality. If, for any reason, such certified mail is returned without evidence of proper receipt, the municipality shall resend the notice(s) by first class mail, postage prepaid, and shall also post notice on the front door or other conspicuous location on the subject property.
(i) To the extent not otherwise authorized by state law, all notices of violation or correction for violations that do not fall within one of the categories set forth in paragraph (A) or (B), subdivision (1), subsection (f) of this section issued by the enforcement agency of a municipality that has adopted the state building code shall be served in accordance with the process set forth in the state building code. All notices of violation or correction orders for violations that do not fall within one of the categories set forth in paragraph (A) or (B), subdivision (1), subsection (f) of this section issued by a code enforcement agency of a municipality that has not adopted the state building code shall be served in accordance with the law of this state concerning the service of process in civil actions, except that personal service may be made by a code enforcement agency official and the method of service effectuated by mail by the clerk of a court as permitted by Rule 4(d)(1)(D) of the West Virginia Rules of Civil Procedure is effectuated by mailing by a code enforcement agency official and shall be posted in a conspicuous place on the property that is the subject of the notice of violation or correction.
(j) Any violation of an ordinance adopted under this section, may be prosecuted by the municipality consistent with state and local laws. Unless otherwise authorized by state law, prosecution of a violation shall be initiated by a complaint presented to and sworn or affirmed before a municipal judge or other municipal official with lawful authority to hear and determine violations of municipal code in the municipality where the offense is alleged to have occurred. Unless otherwise provided by statute, the presentation and oath or affirmation shall be made by a code enforcement agency official or municipal attorney showing reason to have reliable information and belief. If from the facts stated in the complaint the municipal judge or other municipal official with lawful authority to hear and determine violations of municipal code finds probable cause, the complaint becomes the charging instrument initiating a criminal proceeding. A complaint lawfully authorized by this subsection along with a summons setting forth the date, time and place of appearance before a municipal judge and or other municipal official with lawful authority to hear and determine violations of municipal code shall be served in accordance with the law of the State of West Virginia concerning the service of process in civil actions, except that personal service of a summons and complaint may be made by a code enforcement agency official. If service is made by certified mail under Rule 4(d)(1)(D) of the West Virginia Rules of Civil Procedure and delivery of the summons and complaint is refused, the code enforcement agency official, promptly upon the receipt of the notice of the refusal, shall mail to the person or entity being noticed, by first class mail, postage prepaid, a copy of the summons and complaint. If the first class mailing is not returned as undeliverable by the U. S. Postal Service, service of the summons and complaint is presumed to have been effectuated. Upon service of the summons and complaint consistent with this subsection, the violation may be prosecuted consistent with state and local law.