diff options
author | Adam <Adam@anope.org> | 2012-02-14 15:13:27 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2012-02-14 15:13:27 -0500 |
commit | a9772cde21407c89abd161d51aff45267f87b1fb (patch) | |
tree | 9e57ba6c121d3843888917d968dd4f5d030b57cf /src/operserv.cpp | |
parent | 086790d6331357022f4da17c76b26b9fc6e2ad90 (diff) |
Clean up and reorganize our header files
Diffstat (limited to 'src/operserv.cpp')
-rw-r--r-- | src/operserv.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/operserv.cpp b/src/operserv.cpp index e32937797..6cdbf2ff3 100644 --- a/src/operserv.cpp +++ b/src/operserv.cpp @@ -9,9 +9,13 @@ * Based on the original code of Services by Andy Church. */ + #include "services.h" #include "modules.h" #include "oper.h" +#include "users.h" +#include "extern.h" +#include "sockets.h" /* List of XLine managers we check users against in XLineManager::CheckAll */ std::list<XLineManager *> XLineManager::XLineManagers; @@ -62,13 +66,6 @@ Anope::string XLine::GetHost() const return this->Mask.substr(host_t + 1); } -sockaddrs XLine::GetIP() const -{ - sockaddrs addr; - addr.pton(this->GetHost().find(':') != Anope::string::npos ? AF_INET6 : AF_INET, this->GetHost()); - return addr; -} - Anope::string XLine::serialize_name() const { return "XLine"; @@ -361,12 +358,13 @@ XLine *XLineManager::Check(User *u) if (!x->GetUser().empty() && !Anope::Match(u->GetIdent(), x->GetUser())) continue; - if (u->ip() && !x->GetHost().empty()) + if (!x->GetHost().empty()) { try { cidr cidr_ip(x->GetHost()); - if (cidr_ip.match(u->ip)) + sockaddrs ip(u->ip); + if (cidr_ip.match(ip)) { OnMatch(u, x); return x; |