in case the internet goes mad...
This commit is contained in:
parent
9f128ef27d
commit
4f4262ecf0
1 changed files with 6 additions and 2 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Reference in a new issue