Can a HOA restrict an AirBnB from operating in NC?

Tenants of a building that has an HOA might sue to restrict AirBnB from operating in Wilmington NC. Is this legal when they had no restrictions before?