From eb28eaea35d9d109a0b7b890de9d957d562da675 Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 9 Aug 2006 21:50:16 +0000 Subject: Passing invalid instance to dns isnt a good idea git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4825 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/users.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/users.cpp') diff --git a/src/users.cpp b/src/users.cpp index 4dccb07f0..7fcda61a9 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -132,7 +132,8 @@ void userrec::StartDNSLookup() log(DEBUG,"Commencing reverse lookup"); try { - res_reverse = new UserResolver(ServerInstance, this, this->GetIPString(), false); + log(DEBUG,"Passing instance: %08x",this->ServerInstance); + res_reverse = new UserResolver(this->ServerInstance, this, this->GetIPString(), false); MyServer->AddResolver(res_reverse); } catch (ModuleException& e) @@ -142,7 +143,7 @@ void userrec::StartDNSLookup() } UserResolver::UserResolver(InspIRCd* Instance, userrec* user, std::string to_resolve, bool forward) : - Resolver(ServerInstance, to_resolve, forward ? DNS_QUERY_FORWARD : DNS_QUERY_REVERSE), bound_user(user) + Resolver(Instance, to_resolve, forward ? DNS_QUERY_FORWARD : DNS_QUERY_REVERSE), bound_user(user) { this->fwd = forward; this->bound_fd = user->fd; @@ -256,6 +257,7 @@ const char* userrec::FormatModes() userrec::userrec(InspIRCd* Instance) : ServerInstance(Instance) { + log(DEBUG,"userrec::userrec(): Instance: %08x",ServerInstance); // the PROPER way to do it, AVOID bzero at *ALL* costs *password = *nick = *ident = *host = *dhost = *fullname = *awaymsg = *oper = 0; server = (char*)Instance->FindServerNamePtr(Instance->Config->ServerName); -- cgit v1.3.1-10-gc9f91