summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/typedefs.h4
-rw-r--r--include/usermanager.h6
-rw-r--r--src/coremods/core_privmsg.cpp4
-rw-r--r--src/coremods/core_stats.cpp4
-rw-r--r--src/coremods/core_wallops.cpp2
-rw-r--r--src/helperfuncs.cpp2
-rw-r--r--src/inspircd.cpp4
-rw-r--r--src/modules/extra/m_geoip.cpp2
-rw-r--r--src/modules/m_close.cpp2
-rw-r--r--src/modules/m_jumpserver.cpp2
-rw-r--r--src/modules/m_modenotice.cpp2
-rw-r--r--src/modules/m_nationalchars.cpp2
-rw-r--r--src/modules/m_spanningtree/main.cpp8
-rw-r--r--src/usermanager.cpp6
-rw-r--r--src/xline.cpp10
15 files changed, 30 insertions, 30 deletions
diff --git a/include/typedefs.h b/include/typedefs.h
index 8f9a64888..dfecb0483 100644
--- a/include/typedefs.h
+++ b/include/typedefs.h
@@ -54,10 +54,6 @@ struct ModResult;
typedef TR1NS::unordered_map<std::string, User*, irc::insensitive, irc::StrHashComp> user_hash;
typedef TR1NS::unordered_map<std::string, Channel*, irc::insensitive, irc::StrHashComp> chan_hash;
-/** A list holding local users, this is the type of UserManager::local_users
- */
-typedef intrusive_list<LocalUser> LocalUserList;
-
/** A list of failed port bindings, used for informational purposes on startup */
typedef std::vector<std::pair<std::string, std::string> > FailedPortList;
diff --git a/include/usermanager.h b/include/usermanager.h
index 945e64439..2f77e8333 100644
--- a/include/usermanager.h
+++ b/include/usermanager.h
@@ -39,6 +39,10 @@ class CoreExport UserManager : public fakederef<UserManager>
*/
typedef std::vector<User*> OperList;
+ /** A list holding local users
+ */
+ typedef intrusive_list<LocalUser> LocalList;
+
private:
/** Map of IP addresses for clone counting
*/
@@ -68,7 +72,7 @@ class CoreExport UserManager : public fakederef<UserManager>
/** Local client list, a list containing only local clients
*/
- LocalUserList local_users;
+ LocalList local_users;
/** Oper list, a vector containing all local and remote opered users
*/
diff --git a/src/coremods/core_privmsg.cpp b/src/coremods/core_privmsg.cpp
index 34953bbe8..5ec3097a5 100644
--- a/src/coremods/core_privmsg.cpp
+++ b/src/coremods/core_privmsg.cpp
@@ -67,8 +67,8 @@ class MessageCommandBase : public Command
void MessageCommandBase::SendAll(User* user, const std::string& msg, MessageType mt)
{
const std::string message = ":" + user->GetFullHost() + " " + MessageTypeString[mt] + " $* :" + msg;
- const LocalUserList& list = ServerInstance->Users->local_users;
- for (LocalUserList::const_iterator i = list.begin(); i != list.end(); ++i)
+ const UserManager::LocalList& list = ServerInstance->Users->local_users;
+ for (UserManager::LocalList::const_iterator i = list.begin(); i != list.end(); ++i)
{
if ((*i)->registered == REG_ALL)
(*i)->Write(message);
diff --git a/src/coremods/core_stats.cpp b/src/coremods/core_stats.cpp
index 468e230f8..0034889ab 100644
--- a/src/coremods/core_stats.cpp
+++ b/src/coremods/core_stats.cpp
@@ -54,8 +54,8 @@ static void GenerateStatsLl(User* user, string_list& results, char c)
{
results.push_back(InspIRCd::Format("211 %s nick[ident@%s] sendq cmds_out bytes_out cmds_in bytes_in time_open", user->nick.c_str(), (c == 'l' ? "host" : "ip")));
- const LocalUserList& list = ServerInstance->Users->local_users;
- for (LocalUserList::const_iterator i = list.begin(); i != list.end(); ++i)
+ const UserManager::LocalList& list = ServerInstance->Users->local_users;
+ for (UserManager::LocalList::const_iterator i = list.begin(); i != list.end(); ++i)
{
LocalUser* u = *i;
results.push_back("211 "+user->nick+" "+u->nick+"["+u->ident+"@"+(c == 'l' ? u->dhost : u->GetIPString())+"] "+ConvToStr(u->eh.getSendQSize())+" "+ConvToStr(u->cmds_out)+" "+ConvToStr(u->bytes_out)+" "+ConvToStr(u->cmds_in)+" "+ConvToStr(u->bytes_in)+" "+ConvToStr(ServerInstance->Time() - u->age));
diff --git a/src/coremods/core_wallops.cpp b/src/coremods/core_wallops.cpp
index 5dfb79b67..871a6e60e 100644
--- a/src/coremods/core_wallops.cpp
+++ b/src/coremods/core_wallops.cpp
@@ -55,7 +55,7 @@ CmdResult CommandWallops::Handle (const std::vector<std::string>& parameters, Us
std::string wallop("WALLOPS :");
wallop.append(parameters[0]);
- for (LocalUserList::const_iterator i = ServerInstance->Users->local_users.begin(); i != ServerInstance->Users->local_users.end(); i++)
+ for (UserManager::LocalList::const_iterator i = ServerInstance->Users->local_users.begin(); i != ServerInstance->Users->local_users.end(); ++i)
{
User* t = *i;
if (t->IsModeSet(wallopsmode))
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp
index 71fb71cdf..55a1b9f83 100644
--- a/src/helperfuncs.cpp
+++ b/src/helperfuncs.cpp
@@ -82,7 +82,7 @@ Channel* InspIRCd::FindChan(const std::string &chan)
/* Send an error notice to all users, registered or not */
void InspIRCd::SendError(const std::string &s)
{
- for (LocalUserList::const_iterator i = this->Users->local_users.begin(); i != this->Users->local_users.end(); i++)
+ for (UserManager::LocalList::const_iterator i = this->Users->local_users.begin(); i != this->Users->local_users.end(); ++i)
{
User* u = *i;
if (u->registered == REG_ALL)
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index cad322e34..fec4aedea 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -109,8 +109,8 @@ void InspIRCd::Cleanup()
ports.clear();
/* Close all client sockets, or the new process inherits them */
- LocalUserList& list = Users->local_users;
- for (LocalUserList::iterator i = list.begin(); i != list.end(); ++i)
+ UserManager::LocalList& list = Users->local_users;
+ for (UserManager::LocalList::iterator i = list.begin(); i != list.end(); ++i)
Users->QuitUser(*i, "Server shutdown");
GlobalCulls.Apply();
diff --git a/src/modules/extra/m_geoip.cpp b/src/modules/extra/m_geoip.cpp
index 394f7f9b4..f8e358bf7 100644
--- a/src/modules/extra/m_geoip.cpp
+++ b/src/modules/extra/m_geoip.cpp
@@ -56,7 +56,7 @@ class ModuleGeoIP : public Module
if (gi == NULL)
throw ModuleException("Unable to initialize geoip, are you missing GeoIP.dat?");
- for (LocalUserList::const_iterator i = ServerInstance->Users->local_users.begin(); i != ServerInstance->Users->local_users.end(); ++i)
+ for (UserManager::LocalList::const_iterator i = ServerInstance->Users->local_users.begin(); i != ServerInstance->Users->local_users.end(); ++i)
{
LocalUser* user = *i;
if ((user->registered == REG_ALL) && (!ext.get(user)))
diff --git a/src/modules/m_close.cpp b/src/modules/m_close.cpp
index 9c5c9a77b..f8bac669d 100644
--- a/src/modules/m_close.cpp
+++ b/src/modules/m_close.cpp
@@ -35,7 +35,7 @@ class CommandClose : public Command
{
std::map<std::string,int> closed;
- for (LocalUserList::const_iterator u = ServerInstance->Users->local_users.begin(); u != ServerInstance->Users->local_users.end(); ++u)
+ for (UserManager::LocalList::const_iterator u = ServerInstance->Users->local_users.begin(); u != ServerInstance->Users->local_users.end(); ++u)
{
LocalUser* user = *u;
if (user->registered != REG_ALL)
diff --git a/src/modules/m_jumpserver.cpp b/src/modules/m_jumpserver.cpp
index 523500e50..9ee224704 100644
--- a/src/modules/m_jumpserver.cpp
+++ b/src/modules/m_jumpserver.cpp
@@ -108,7 +108,7 @@ class CommandJumpserver : public Command
if (redirect_all_immediately)
{
/* Redirect everyone but the oper sending the command */
- for (LocalUserList::const_iterator i = ServerInstance->Users->local_users.begin(); i != ServerInstance->Users->local_users.end(); ++i)
+ for (UserManager::LocalList::const_iterator i = ServerInstance->Users->local_users.begin(); i != ServerInstance->Users->local_users.end(); ++i)
{
LocalUser* t = *i;
if (!t->IsOper())
diff --git a/src/modules/m_modenotice.cpp b/src/modules/m_modenotice.cpp
index e02c9147f..0078c6325 100644
--- a/src/modules/m_modenotice.cpp
+++ b/src/modules/m_modenotice.cpp
@@ -32,7 +32,7 @@ class CommandModeNotice : public Command
{
std::string msg = "*** From " + src->nick + ": " + parameters[1];
int mlen = parameters[0].length();
- for (LocalUserList::const_iterator i = ServerInstance->Users->local_users.begin(); i != ServerInstance->Users->local_users.end(); i++)
+ for (UserManager::LocalList::const_iterator i = ServerInstance->Users->local_users.begin(); i != ServerInstance->Users->local_users.end(); ++i)
{
User* user = *i;
for (int n = 0; n < mlen; n++)
diff --git a/src/modules/m_nationalchars.cpp b/src/modules/m_nationalchars.cpp
index 6889e388f..3efd97a24 100644
--- a/src/modules/m_nationalchars.cpp
+++ b/src/modules/m_nationalchars.cpp
@@ -261,7 +261,7 @@ class ModuleNationalChars : public Module
if (!forcequit)
return;
- for (LocalUserList::const_iterator iter = ServerInstance->Users->local_users.begin(); iter != ServerInstance->Users->local_users.end(); ++iter)
+ for (UserManager::LocalList::const_iterator iter = ServerInstance->Users->local_users.begin(); iter != ServerInstance->Users->local_users.end(); ++iter)
{
/* Fix by Brain: Dont quit UID users */
User* n = *iter;
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp
index 979048d65..b24d8c6ee 100644
--- a/src/modules/m_spanningtree/main.cpp
+++ b/src/modules/m_spanningtree/main.cpp
@@ -62,16 +62,16 @@ namespace
// Does not change the server of quitting users because those are not in the list
ServerInstance->FakeClient->server = newserver;
- const LocalUserList& list = ServerInstance->Users->local_users;
- for (LocalUserList::const_iterator i = list.begin(); i != list.end(); ++i)
+ const UserManager::LocalList& list = ServerInstance->Users->local_users;
+ for (UserManager::LocalList::const_iterator i = list.begin(); i != list.end(); ++i)
(*i)->server = newserver;
}
void ResetMembershipIds()
{
// Set all membership ids to 0
- const LocalUserList& list = ServerInstance->Users->local_users;
- for (LocalUserList::iterator i = list.begin(); i != list.end(); ++i)
+ const UserManager::LocalList& list = ServerInstance->Users->local_users;
+ for (UserManager::LocalList::iterator i = list.begin(); i != list.end(); ++i)
{
LocalUser* user = *i;
for (User::ChanList::iterator j = user->chans.begin(); j != user->chans.end(); ++j)
diff --git a/src/usermanager.cpp b/src/usermanager.cpp
index 9c04c7889..2dcee852c 100644
--- a/src/usermanager.cpp
+++ b/src/usermanager.cpp
@@ -245,7 +245,7 @@ void UserManager::ServerNoticeAll(const char* text, ...)
VAFORMAT(message, text, text);
message = "NOTICE $" + ServerInstance->Config->ServerName + " :" + message;
- for (LocalUserList::const_iterator i = local_users.begin(); i != local_users.end(); i++)
+ for (LocalList::const_iterator i = local_users.begin(); i != local_users.end(); ++i)
{
User* t = *i;
t->WriteServ(message);
@@ -256,7 +256,7 @@ void UserManager::GarbageCollect()
{
// Reset the already_sent IDs so we don't wrap it around and drop a message
LocalUser::already_sent_id = 0;
- for (LocalUserList::const_iterator i = this->local_users.begin(); i != this->local_users.end(); i++)
+ for (LocalList::const_iterator i = local_users.begin(); i != local_users.end(); ++i)
{
(**i).already_sent = 0;
(**i).RemoveExpiredInvites();
@@ -284,7 +284,7 @@ void UserManager::DoBackgroundUserStuff()
/*
* loop over all local users..
*/
- for (LocalUserList::iterator i = local_users.begin(); i != local_users.end(); ++i)
+ for (LocalList::iterator i = local_users.begin(); i != local_users.end(); ++i)
{
LocalUser* curr = *i;
diff --git a/src/xline.cpp b/src/xline.cpp
index b74fda3cf..62afcc285 100644
--- a/src/xline.cpp
+++ b/src/xline.cpp
@@ -155,7 +155,7 @@ void XLineManager::CheckELines()
if (ELines.empty())
return;
- for (LocalUserList::const_iterator u2 = ServerInstance->Users->local_users.begin(); u2 != ServerInstance->Users->local_users.end(); u2++)
+ for (UserManager::LocalList::const_iterator u2 = ServerInstance->Users->local_users.begin(); u2 != ServerInstance->Users->local_users.end(); u2++)
{
LocalUser* u = *u2;
@@ -325,7 +325,7 @@ bool XLineManager::DelLine(const char* hostmask, const std::string &type, User*
void ELine::Unset()
{
/* remove exempt from everyone and force recheck after deleting eline */
- for (LocalUserList::const_iterator u2 = ServerInstance->Users->local_users.begin(); u2 != ServerInstance->Users->local_users.end(); u2++)
+ for (UserManager::LocalList::const_iterator u2 = ServerInstance->Users->local_users.begin(); u2 != ServerInstance->Users->local_users.end(); u2++)
{
LocalUser* u = *u2;
u->exempt = false;
@@ -429,8 +429,8 @@ void XLineManager::ExpireLine(ContainerIter container, LookupIter item)
// applies lines, removing clients and changing nicks etc as applicable
void XLineManager::ApplyLines()
{
- LocalUserList& list = ServerInstance->Users->local_users;
- for (LocalUserList::iterator j = list.begin(); j != list.end(); ++j)
+ UserManager::LocalList& list = ServerInstance->Users->local_users;
+ for (UserManager::LocalList::iterator j = list.begin(); j != list.end(); ++j)
{
LocalUser* u = *j;
@@ -679,7 +679,7 @@ bool GLine::Matches(const std::string &str)
void ELine::OnAdd()
{
/* When adding one eline, only check the one eline */
- for (LocalUserList::const_iterator u2 = ServerInstance->Users->local_users.begin(); u2 != ServerInstance->Users->local_users.end(); u2++)
+ for (UserManager::LocalList::const_iterator u2 = ServerInstance->Users->local_users.begin(); u2 != ServerInstance->Users->local_users.end(); u2++)
{
LocalUser* u = *u2;
if (this->Matches(u))