diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_cgiirc.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_spanningtree.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_testcommand.cpp | 6 | ||||
-rw-r--r-- | src/users.cpp | 3 |
4 files changed, 8 insertions, 7 deletions
diff --git a/src/modules/m_cgiirc.cpp b/src/modules/m_cgiirc.cpp index f81b97fed..a063a0849 100644 --- a/src/modules/m_cgiirc.cpp +++ b/src/modules/m_cgiirc.cpp @@ -56,7 +56,7 @@ class CGIResolver : public Resolver bool notify; public: CGIResolver(bool NotifyOpers, const std::string &source, bool forward, userrec* u, int userfd, const std::string &type) - : Resolver(source, forward), typ(type), theirfd(userfd), them(u), notify(NotifyOpers) { } + : Resolver(source, forward ? DNS_QUERY_FORWARD : DNS_QUERY_REVERSE), typ(type), theirfd(userfd), them(u), notify(NotifyOpers) { } virtual void OnLookupComplete(const std::string &result) { diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 76de8af3a..f64f24013 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -3063,7 +3063,7 @@ class ServernameResolver : public Resolver */ Link MyLink; public: - ServernameResolver(const std::string &hostname, Link x) : Resolver(hostname, true), MyLink(x) + ServernameResolver(const std::string &hostname, Link x) : Resolver(hostname, DNS_QUERY_FORWARD), MyLink(x) { /* Nothing in here, folks */ } @@ -3104,7 +3104,7 @@ class SecurityIPResolver : public Resolver private: Link MyLink; public: - SecurityIPResolver(const std::string &hostname, Link x) : Resolver(hostname, true), MyLink(x) + SecurityIPResolver(const std::string &hostname, Link x) : Resolver(hostname, DNS_QUERY_FORWARD), MyLink(x) { } diff --git a/src/modules/m_testcommand.cpp b/src/modules/m_testcommand.cpp index fb061a898..ebb09a19d 100644 --- a/src/modules/m_testcommand.cpp +++ b/src/modules/m_testcommand.cpp @@ -25,10 +25,10 @@ using namespace std; /* $ModDesc: Povides a proof-of-concept test /WOOT command */ -class MyResolver : public Resolver +class MyV6Resolver : public Resolver { public: - MyResolver(const std::string &source, bool forward) : Resolver(source, forward) { } + MyV6Resolver(const std::string &source) : Resolver(source, DNS_QUERY_AAAA) { } virtual void OnLookupComplete(const std::string &result) { @@ -58,7 +58,7 @@ class cmd_woot : public command_t try { - MyResolver* r = new MyResolver("brainbox.ath.cx", true); + MyV6Resolver* r = new MyV6Resolver("shake.stacken.kth.se"); Srv->AddResolver(r); } catch (ModuleException& e) diff --git a/src/users.cpp b/src/users.cpp index ced542d3c..661dc905b 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -148,8 +148,9 @@ void userrec::StartDNSLookup() } } -UserResolver::UserResolver(userrec* user, std::string to_resolve, bool forward) : Resolver(to_resolve, forward), bound_user(user) +UserResolver::UserResolver(userrec* user, std::string to_resolve, bool forward) : Resolver(to_resolve, forward ? DNS_QUERY_FORWARD : DNS_QUERY_REVERSE), bound_user(user) { + this->fwd = forward; this->bound_fd = user->fd; } |