diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-09-13 20:31:54 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-09-13 20:31:54 +0000 |
commit | d9e3bb8d4343643504ab7ee6ab943a000065cc8a (patch) | |
tree | 24d5d857f66b843f2d08c8a39ebbf812592c0f73 /src/users.cpp | |
parent | 8f9dafbfa3b62b1c88a8b1ad7988d5786f914528 (diff) |
Remove redundant ServerInstance* fields
It has been impossible to have more than one InspIRCd* object in the
same address space for some time now, and this feature was never used.
This formalizes class InspIRCd as a singleton object.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11703 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/users.cpp')
-rw-r--r-- | src/users.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/users.cpp b/src/users.cpp index 7f60b2f93..b361205da 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -109,9 +109,9 @@ void User::StartDNSLookup() UserResolver *res_reverse; QueryType resolvtype = this->client_sa.sa.sa_family == AF_INET6 ? DNS_QUERY_PTR6 : DNS_QUERY_PTR4; - res_reverse = new UserResolver(this->ServerInstance, this, sip, resolvtype, cached); + res_reverse = new UserResolver(ServerInstance, this, sip, resolvtype, cached); - this->ServerInstance->AddResolver(res_reverse, cached); + ServerInstance->AddResolver(res_reverse, cached); } catch (CoreException& e) { @@ -205,7 +205,7 @@ void User::DecrementModes() } } -User::User(InspIRCd* Instance, const std::string &uid) : ServerInstance(Instance) +User::User(InspIRCd* Instance, const std::string &uid) { server = Instance->FindServerNamePtr(Instance->Config->ServerName); age = ServerInstance->Time(); @@ -716,7 +716,7 @@ void User::FlushWriteBuf() this->bytes_out += n_sent; this->cmds_out++; if (n_sent != old_sendq_length) - this->ServerInstance->SE->WantWrite(this); + ServerInstance->SE->WantWrite(this); } } @@ -1219,7 +1219,7 @@ void User::Write(const std::string& text) this->AddWriteBuf("\r\n"); } ServerInstance->stats->statsSent += text.length() + 2; - this->ServerInstance->SE->WantWrite(this); + ServerInstance->SE->WantWrite(this); } /** Write() @@ -1567,7 +1567,7 @@ void User::DoHostCycle(const std::string &quitline) Channel* c = *v; snprintf(buffer, MAXBUF, ":%s JOIN %s", GetFullHost().c_str(), c->name.c_str()); std::string joinline(buffer); - std::string modeline = this->ServerInstance->Modes->ModeString(this, c); + std::string modeline = ServerInstance->Modes->ModeString(this, c); if (modeline.length() > 0) { snprintf(buffer, MAXBUF, ":%s MODE %s +%s", GetFullHost().c_str(), c->name.c_str(), modeline.c_str()); |