From dd98d56cabcd08a3d5207454e002b187af98d28a Mon Sep 17 00:00:00 2001 From: w00t Date: Sat, 2 Feb 2008 20:55:16 +0000 Subject: 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 --- src/modules/m_callerid.cpp | 2 +- src/modules/m_check.cpp | 2 +- src/modules/m_close.cpp | 2 +- src/modules/m_httpd_stats.cpp | 6 +++--- src/modules/m_invisible.cpp | 4 ++-- src/modules/m_jumpserver.cpp | 2 +- src/modules/m_spanningtree/main.cpp | 6 +++--- src/modules/m_spanningtree/override_map.cpp | 4 ++-- src/modules/m_spanningtree/treeserver.cpp | 2 +- src/modules/m_spanningtree/treesocket1.cpp | 8 ++++---- src/modules/m_spanningtree/treesocket2.cpp | 6 +++--- src/modules/m_tline.cpp | 2 +- 12 files changed, 23 insertions(+), 23 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_callerid.cpp b/src/modules/m_callerid.cpp index d3df1948b..7fea35d34 100644 --- a/src/modules/m_callerid.cpp +++ b/src/modules/m_callerid.cpp @@ -48,7 +48,7 @@ void RemoveData(User* who) void RemoveFromAllAccepts(InspIRCd* ServerInstance, User* who) { - for (user_hash::iterator i = ServerInstance->clientlist->begin(); i != ServerInstance->clientlist->end(); ++i) + for (user_hash::iterator i = ServerInstance->Users->clientlist->begin(); i != ServerInstance->Users->clientlist->end(); ++i) { callerid_data* dat = GetData(i->second, false); if (!dat) continue; diff --git a/src/modules/m_check.cpp b/src/modules/m_check.cpp index cc8c7846b..af8aaa3fc 100644 --- a/src/modules/m_check.cpp +++ b/src/modules/m_check.cpp @@ -129,7 +129,7 @@ class CommandCheck : public Command long x = 0; /* hostname or other */ - for (user_hash::const_iterator a = ServerInstance->clientlist->begin(); a != ServerInstance->clientlist->end(); a++) + for (user_hash::const_iterator a = ServerInstance->Users->clientlist->begin(); a != ServerInstance->Users->clientlist->end(); a++) { if (match(a->second->host, parameters[0]) || match(a->second->dhost, parameters[0])) { diff --git a/src/modules/m_close.cpp b/src/modules/m_close.cpp index 5d703c0d0..9b868e61e 100644 --- a/src/modules/m_close.cpp +++ b/src/modules/m_close.cpp @@ -28,7 +28,7 @@ class CommandClose : public Command { std::map closed; - for (std::vector::iterator u = ServerInstance->local_users.begin(); u != ServerInstance->local_users.end(); u++) + for (std::vector::iterator u = ServerInstance->Users->local_users.begin(); u != ServerInstance->Users->local_users.end(); u++) { if ((*u)->registered != REG_ALL) { diff --git a/src/modules/m_httpd_stats.cpp b/src/modules/m_httpd_stats.cpp index de72dc339..63ddedcb8 100644 --- a/src/modules/m_httpd_stats.cpp +++ b/src/modules/m_httpd_stats.cpp @@ -73,7 +73,7 @@ class ModuleHttpStats : public Module so->clear(); for (StatsIter a = sh->begin(); a != sh->end(); a++) InsertOrder(a->first, a->second); - for (user_hash::iterator u = ServerInstance->clientlist->begin(); u != ServerInstance->clientlist->end(); u++) + for (user_hash::iterator u = ServerInstance->Users->clientlist->begin(); u != ServerInstance->Users->clientlist->end(); u++) { StatsHash::iterator n = Servers->find(u->second->server); if (n != Servers->end()) @@ -103,9 +103,9 @@ class ModuleHttpStats : public Module data << "" << ServerInstance->Config->ServerName << "" << ServerInstance->Config->ServerDesc << ""; data << ""; - data << "" << ServerInstance->clientlist->size() << ""; + data << "" << ServerInstance->Users->clientlist->size() << ""; data << "" << ServerInstance->chanlist->size() << ""; - data << "" << ServerInstance->all_opers.size() << ""; + data << "" << ServerInstance->Users->all_opers.size() << ""; data << "" << (ServerInstance->SE->GetMaxFds() - ServerInstance->SE->GetRemainingFds()) << "" << ServerInstance->SE->GetMaxFds() << "" << ServerInstance->SE->GetName() << ""; diff --git a/src/modules/m_invisible.cpp b/src/modules/m_invisible.cpp index 30935c1dd..3f816b3c0 100644 --- a/src/modules/m_invisible.cpp +++ b/src/modules/m_invisible.cpp @@ -47,7 +47,7 @@ class InvisibleMode : public ModeHandler ~InvisibleMode() { - for (user_hash::iterator i = ServerInstance->clientlist->begin(); i != ServerInstance->clientlist->end(); i++) + for (user_hash::iterator i = ServerInstance->Users->clientlist->begin(); i != ServerInstance->Users->clientlist->end(); i++) if (i->second->Visibility == qo) i->second->Visibility = NULL; delete qo; @@ -166,7 +166,7 @@ class ModuleInvisible : public Module throw ModuleException("Could not add new mode watcher on usermode +o!"); /* Yeah i know people can take this out. I'm not about to obfuscate code just to be a pain in the ass. */ - ServerInstance->ServerNoticeAll("*** m_invisible.so has just been loaded on this network. For more information, please visit http://inspircd.org/wiki/Modules/invisible"); + ServerInstance->Users->ServerNoticeAll("*** m_invisible.so has just been loaded on this network. For more information, please visit http://inspircd.org/wiki/Modules/invisible"); Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_OnUserJoin, I_OnUserPart, I_OnUserQuit, I_OnRehash }; ServerInstance->Modules->Attach(eventlist, this, 6); } diff --git a/src/modules/m_jumpserver.cpp b/src/modules/m_jumpserver.cpp index 86df62332..255d3eac9 100644 --- a/src/modules/m_jumpserver.cpp +++ b/src/modules/m_jumpserver.cpp @@ -84,7 +84,7 @@ class CommandJumpserver : public Command if (redirect_all_immediately) { /* Redirect everyone but the oper sending the command */ - for (std::vector::const_iterator i = ServerInstance->local_users.begin(); i != ServerInstance->local_users.end(); i++) + for (std::vector::const_iterator i = ServerInstance->Users->local_users.begin(); i != ServerInstance->Users->local_users.end(); i++) { User* t = *i; if (!IS_OPER(t)) 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::const_iterator i = ServerInstance->local_users.begin(); i != ServerInstance->local_users.end(); i++) + for (std::vector::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 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 &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 &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 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 &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); } diff --git a/src/modules/m_tline.cpp b/src/modules/m_tline.cpp index 06941c168..28a3d2f69 100644 --- a/src/modules/m_tline.cpp +++ b/src/modules/m_tline.cpp @@ -34,7 +34,7 @@ class CommandTline : public Command float n_match_host = 0; float n_match_ip = 0; - for (user_hash::const_iterator u = ServerInstance->clientlist->begin(); u != ServerInstance->clientlist->end(); u++) + for (user_hash::const_iterator u = ServerInstance->Users->clientlist->begin(); u != ServerInstance->Users->clientlist->end(); u++) { n_counted++; if (match(u->second->GetFullRealHost(),parameters[0])) -- cgit v1.2.3