summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-02-02 20:55:16 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-02-02 20:55:16 +0000
commitdd98d56cabcd08a3d5207454e002b187af98d28a (patch)
treeeb1eda174686679b500dee7d9f35a8c67a15971e /src/modules
parent0808eb7a9dd3b339f5b37f0ee67c5253ccbc2956 (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')
-rw-r--r--src/modules/m_callerid.cpp2
-rw-r--r--src/modules/m_check.cpp2
-rw-r--r--src/modules/m_close.cpp2
-rw-r--r--src/modules/m_httpd_stats.cpp6
-rw-r--r--src/modules/m_invisible.cpp4
-rw-r--r--src/modules/m_jumpserver.cpp2
-rw-r--r--src/modules/m_spanningtree/main.cpp6
-rw-r--r--src/modules/m_spanningtree/override_map.cpp4
-rw-r--r--src/modules/m_spanningtree/treeserver.cpp2
-rw-r--r--src/modules/m_spanningtree/treesocket1.cpp8
-rw-r--r--src/modules/m_spanningtree/treesocket2.cpp6
-rw-r--r--src/modules/m_tline.cpp2
12 files changed, 23 insertions, 23 deletions
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<std::string,int> closed;
- for (std::vector<User*>::iterator u = ServerInstance->local_users.begin(); u != ServerInstance->local_users.end(); u++)
+ for (std::vector<User*>::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 << "<server><name>" << ServerInstance->Config->ServerName << "</name><gecos>" << ServerInstance->Config->ServerDesc << "</gecos></server>";
data << "<general>";
- data << "<usercount>" << ServerInstance->clientlist->size() << "</usercount>";
+ data << "<usercount>" << ServerInstance->Users->clientlist->size() << "</usercount>";
data << "<channelcount>" << ServerInstance->chanlist->size() << "</channelcount>";
- data << "<opercount>" << ServerInstance->all_opers.size() << "</opercount>";
+ data << "<opercount>" << ServerInstance->Users->all_opers.size() << "</opercount>";
data << "<socketcount>" << (ServerInstance->SE->GetMaxFds() - ServerInstance->SE->GetRemainingFds()) << "</socketcount><socketmax>" << ServerInstance->SE->GetMaxFds() <<
"</socketmax><socketengine>" << ServerInstance->SE->GetName() << "</socketengine>";
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<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++)
{
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<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);
}
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]))