in case the internet goes mad...

This commit is contained in:
Gunter Labes 2009-02-25 13:37:02 +00:00
parent 9f128ef27d
commit 4f4262ecf0

View file

@ -273,8 +273,12 @@ namespace wesnothd {
}
bool banned::match_ip(const std::string& ip) const {
ip_mask pair = parse_ip(ip);
return (ip_ & mask_) == (pair.first & mask_);
try {
ip_mask pair = parse_ip(ip);
return (ip_ & mask_) == (pair.first & mask_);
} catch (banned::error& e) {
return false;
}
}
void ban_manager::read()