diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-02-02 20:55:16 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-02-02 20:55:16 +0000 |
commit | dd98d56cabcd08a3d5207454e002b187af98d28a (patch) | |
tree | eb1eda174686679b500dee7d9f35a8c67a15971e /src/modules/m_spanningtree | |
parent | 0808eb7a9dd3b339f5b37f0ee67c5253ccbc2956 (diff) |
Move some stuff to usermanager, remove a little header insanity, remove trace because it's still less useful than a chocolate fireman.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8790 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r-- | src/modules/m_spanningtree/main.cpp | 6 | ||||
-rw-r--r-- | src/modules/m_spanningtree/override_map.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_spanningtree/treeserver.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_spanningtree/treesocket1.cpp | 8 | ||||
-rw-r--r-- | src/modules/m_spanningtree/treesocket2.cpp | 6 |
5 files changed, 13 insertions, 13 deletions
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index 270d7ef82..496840489 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -64,7 +64,7 @@ ModuleSpanningTree::ModuleSpanningTree(InspIRCd* Me) }; ServerInstance->Modules->Attach(eventlist, this, 29); - for (std::vector<User*>::const_iterator i = ServerInstance->local_users.begin(); i != ServerInstance->local_users.end(); i++) + for (std::vector<User*>::const_iterator i = ServerInstance->Users->local_users.begin(); i != ServerInstance->Users->local_users.end(); i++) { this->OnPostConnect((*i)); } @@ -150,8 +150,8 @@ void ModuleSpanningTree::HandleLusers(const char** parameters, int pcnt, User* u } } user->WriteServ("251 %s :There are %d users and %d invisible on %d servers",user->nick, - n_users-ServerInstance->ModeCount('i'), - ServerInstance->ModeCount('i'), + n_users-ServerInstance->Users->ModeCount('i'), + ServerInstance->Users->ModeCount('i'), ulined_count ? this->CountServs() - ulined_count : this->CountServs()); if (ServerInstance->Users->OperCount()) diff --git a/src/modules/m_spanningtree/override_map.cpp b/src/modules/m_spanningtree/override_map.cpp index d50215b76..9b117272a 100644 --- a/src/modules/m_spanningtree/override_map.cpp +++ b/src/modules/m_spanningtree/override_map.cpp @@ -66,14 +66,14 @@ void ModuleSpanningTree::ShowMap(TreeServer* Current, User* user, int depth, cha /* Neat and tidy default values, as we're dealing with a matrix not a simple string */ memset(text, 0, 128); - if (ServerInstance->clientlist->size() == 0) + if (ServerInstance->Users->clientlist->size() == 0) { // If there are no users, WHO THE HELL DID THE /MAP?!?!?! percent = 0; } else { - percent = ((float)Current->GetUserCount() / (float)ServerInstance->clientlist->size()) * 100; + percent = ((float)Current->GetUserCount() / (float)ServerInstance->Users->clientlist->size()) * 100; } const std::string operdata = IS_OPER(user) ? MapOperInfo(Current) : ""; diff --git a/src/modules/m_spanningtree/treeserver.cpp b/src/modules/m_spanningtree/treeserver.cpp index 8b0f95b71..50b5d7949 100644 --- a/src/modules/m_spanningtree/treeserver.cpp +++ b/src/modules/m_spanningtree/treeserver.cpp @@ -150,7 +150,7 @@ int TreeServer::QuitUsers(const std::string &reason) { const char* reason_s = reason.c_str(); std::vector<User*> time_to_die; - for (user_hash::iterator n = ServerInstance->clientlist->begin(); n != ServerInstance->clientlist->end(); n++) + for (user_hash::iterator n = ServerInstance->Users->clientlist->begin(); n != ServerInstance->Users->clientlist->end(); n++) { if (!strcmp(n->second->server, this->ServerName.c_str())) { diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp index 407717bde..81a339f2e 100644 --- a/src/modules/m_spanningtree/treesocket1.cpp +++ b/src/modules/m_spanningtree/treesocket1.cpp @@ -1046,9 +1046,9 @@ bool TreeSocket::ParseUID(const std::string &source, std::deque<std::string> &pa /* check for collision */ - user_hash::iterator iter = this->Instance->clientlist->find(tempnick); + user_hash::iterator iter = this->Instance->Users->clientlist->find(tempnick); - if (iter != this->Instance->clientlist->end()) + if (iter != this->Instance->Users->clientlist->end()) { /* * Nick collision. @@ -1076,7 +1076,7 @@ bool TreeSocket::ParseUID(const std::string &source, std::deque<std::string> &pa SendError("Protocol violation - Duplicate UUID '" + params[0] + "' on introduction of new user"); return false; } - (*(this->Instance->clientlist))[tempnick] = _new; + (*(this->Instance->Users->clientlist))[tempnick] = _new; _new->SetFd(FD_MAGIC_NUMBER); strlcpy(_new->nick, tempnick, NICKMAX - 1); strlcpy(_new->host, params[3].c_str(),64); @@ -1267,7 +1267,7 @@ void TreeSocket::SendUsers(TreeServer* Current) char data[MAXBUF]; std::deque<std::string> list; std::string dataline; - for (user_hash::iterator u = this->Instance->clientlist->begin(); u != this->Instance->clientlist->end(); u++) + for (user_hash::iterator u = this->Instance->Users->clientlist->begin(); u != this->Instance->Users->clientlist->end(); u++) { if (u->second->registered == REG_ALL) { diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp index 7c2df1e2a..28f66f0d2 100644 --- a/src/modules/m_spanningtree/treesocket2.cpp +++ b/src/modules/m_spanningtree/treesocket2.cpp @@ -242,7 +242,7 @@ bool TreeSocket::OperType(const std::string &prefix, std::deque<std::string> &pa if (u) { if (!u->IsModeSet('o')) - this->Instance->all_opers.push_back(u); + this->Instance->Users->all_opers.push_back(u); u->modes[UM_OPERATOR] = 1; strlcpy(u->oper,opertype.c_str(),NICKMAX-1); Utils->DoOneToAllButSender(u->nick,"OPERTYPE",params,u->server); @@ -1073,7 +1073,7 @@ bool TreeSocket::ProcessLine(std::string &line) if (prefix.empty()) { - this->SendError("BUG (??) Empty prefix recieved."); + this->SendError("BUG (?) Empty prefix recieved."); return false; } } @@ -1480,7 +1480,7 @@ bool TreeSocket::ProcessLine(std::string &line) sourceserv = this->InboundServerName; if (params.size() >= 2) { - Instance->WriteMode(params[0].c_str(), WM_AND, "*** From %s: %s", prefix.c_str(), params[1].c_str()); + Instance->Users->WriteMode(params[0].c_str(), WM_AND, "*** From %s: %s", prefix.c_str(), params[1].c_str()); } return Utils->DoOneToAllButSenderRaw(line, sourceserv, prefix, command, params); } |