Yeah, we had that problem. The woman was all happy about it attracting pretty hummingbirds, but she flipped out when she saw the bats congregating all around it one night. She insisted that we were going to in no way contribute to feeding flying rats, so the feeder was taken down.
I asked her what about the quail seed block? She loves seeing the quail and doves and rabbits all hang around it. Yeah, but what about all the mice and rodents that come around at night?
No surefire way.
A friend of mine had problems with them trying to make nest under the hoods of his vehicles.
Now he keeps the hoods open and a light bulb burning under the vehicles at night.
He hasn't had a problem since.
We had this friendly and non-venomous guy living on our property for a number of years, and he kept our population of rodents in check. Every now and then I'd come across him and get a surprise when my ancient lizard brain momentarily thought he was a rattler. But we made an effort to ensure he was never molested, and he blessed us with not being overrun by ground squirrels and other rodents. I haven't seen him for a few years now, but some other fella must have made their home here, because I haven't seen a jump in scurrying critters.
It is not legal to go out and capture and remove and re-home snakes unless licensed by Game & Fish. However,...if you find a way to get hold of a Bull Snake like this one and have a nice ready-made burrow for them on your property,...it's a lovely natural way to address the matter.