mirror of
https://github.com/anope/anope.git
synced 2026-07-07 01:43:13 +02:00
Make sockaddrs/cidr not throw on invalid ips to give us an easier/cheaper way to test for a valid IP
This commit is contained in:
@@ -79,6 +79,8 @@ union CoreExport sockaddrs
|
||||
* @throws A socket exception if given an invalid structure
|
||||
*/
|
||||
void ntop(int type, const void *src);
|
||||
|
||||
bool valid() const;
|
||||
};
|
||||
|
||||
class CoreExport cidr
|
||||
@@ -91,6 +93,7 @@ class CoreExport cidr
|
||||
cidr(const Anope::string &ip, unsigned char len);
|
||||
Anope::string mask() const;
|
||||
bool match(const sockaddrs &other);
|
||||
bool valid() const;
|
||||
|
||||
bool operator<(const cidr &other) const;
|
||||
bool operator==(const cidr &other) const;
|
||||
|
||||
Reference in New Issue
Block a user