summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-04-09 15:34:54 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-04-09 15:34:54 +0000
commitd7a0cd3db1e8b64a6f706f1831e645ad69aa7927 (patch)
tree16c271fcada893eb55778952251bd89ee836ae52 /src/modules
parent621de565e15f9301b1e735b4c758fb805da57d86 (diff)
Move QuitUser into UserManager class, and unstaticize it. This prepares for some benchmarking lulz on object pooling I plan to do today, as well as making more sense now we *have* a manager class
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9442 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_blockamsg.cpp2
-rw-r--r--src/modules/m_close.cpp2
-rw-r--r--src/modules/m_conn_waitpong.cpp2
-rw-r--r--src/modules/m_connflood.cpp5
-rw-r--r--src/modules/m_dnsbl.cpp2
-rw-r--r--src/modules/m_filter.h4
-rw-r--r--src/modules/m_jumpserver.cpp4
-rw-r--r--src/modules/m_lockserv.cpp2
-rw-r--r--src/modules/m_nicklock.cpp4
-rw-r--r--src/modules/m_proxyscan.cpp2
-rw-r--r--src/modules/m_saquit.cpp2
-rw-r--r--src/modules/m_spanningtree/kill.cpp2
-rw-r--r--src/modules/m_spanningtree/svsnick.cpp2
-rw-r--r--src/modules/m_spanningtree/treeserver.cpp4
14 files changed, 20 insertions, 19 deletions
diff --git a/src/modules/m_blockamsg.cpp b/src/modules/m_blockamsg.cpp
index 39d5b210f..e4a4eaf4e 100644
--- a/src/modules/m_blockamsg.cpp
+++ b/src/modules/m_blockamsg.cpp
@@ -140,7 +140,7 @@ class ModuleBlockAmsg : public Module
ServerInstance->SNO->WriteToSnoMask('A', "%s had an /amsg or /ame denied", user->nick);
if(action == IBLOCK_KILL || action == IBLOCK_KILLOPERS)
- User::QuitUser(ServerInstance, user, "Global message (/amsg or /ame) detected");
+ ServerInstance->Users->QuitUser(user, "Global message (/amsg or /ame) detected");
else if(action == IBLOCK_NOTICE || action == IBLOCK_NOTICEOPERS)
user->WriteServ( "NOTICE %s :Global message (/amsg or /ame) detected", user->nick);
diff --git a/src/modules/m_close.cpp b/src/modules/m_close.cpp
index 4d5c02d58..152ba3c59 100644
--- a/src/modules/m_close.cpp
+++ b/src/modules/m_close.cpp
@@ -32,7 +32,7 @@ class CommandClose : public Command
{
if ((*u)->registered != REG_ALL)
{
- User::QuitUser(ServerInstance, *u, "Closing all unknown connections per request");
+ ServerInstance->Users->QuitUser(*u, "Closing all unknown connections per request");
std::string key = ConvToStr((*u)->GetIPString())+"."+ConvToStr((*u)->GetPort());
closed[key]++;
}
diff --git a/src/modules/m_conn_waitpong.cpp b/src/modules/m_conn_waitpong.cpp
index 4c27efec2..41900966c 100644
--- a/src/modules/m_conn_waitpong.cpp
+++ b/src/modules/m_conn_waitpong.cpp
@@ -87,7 +87,7 @@ class ModuleWaitPong : public Module
else
{
if(killonbadreply)
- User::QuitUser(ServerInstance, user, "Incorrect ping reply for registration");
+ ServerInstance->Users->QuitUser(user, "Incorrect ping reply for registration");
return 1;
}
}
diff --git a/src/modules/m_connflood.cpp b/src/modules/m_connflood.cpp
index 4800847e9..412a0965e 100644
--- a/src/modules/m_connflood.cpp
+++ b/src/modules/m_connflood.cpp
@@ -84,7 +84,8 @@ public:
ServerInstance->SNO->WriteToSnoMask('A', "Connection throttle deactivated");
return 0;
}
- User::QuitUser(ServerInstance, user, quitmsg);
+
+ ServerInstance->Users->QuitUser(user, quitmsg);
return 1;
}
@@ -94,7 +95,7 @@ public:
{
throttled = 1;
ServerInstance->SNO->WriteToSnoMask('A', "Connection throttle activated");
- User::QuitUser(ServerInstance, user, quitmsg);
+ ServerInstance->Users->QuitUser(user, quitmsg);
return 1;
}
}
diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp
index 6b11e7252..b68767933 100644
--- a/src/modules/m_dnsbl.cpp
+++ b/src/modules/m_dnsbl.cpp
@@ -108,7 +108,7 @@ class DNSBLResolver : public Resolver
{
case DNSBLConfEntry::I_KILL:
{
- User::QuitUser(ServerInstance, them, std::string("Killed (") + reason + ")");
+ ServerInstance->Users->QuitUser(them, std::string("Killed (") + reason + ")");
break;
}
case DNSBLConfEntry::I_KLINE:
diff --git a/src/modules/m_filter.h b/src/modules/m_filter.h
index e1f97bd72..2ec56ea4f 100644
--- a/src/modules/m_filter.h
+++ b/src/modules/m_filter.h
@@ -276,7 +276,7 @@ int FilterBase::OnUserPreNotice(User* user,void* dest,int target_type, std::stri
}
if (f->action == "kill")
{
- User::QuitUser(ServerInstance,user,"Filtered: "+f->reason);
+ ServerInstance->Users->QuitUser(user, "Filtered: " + f->reason);
}
if (f->action == "gline")
{
@@ -364,7 +364,7 @@ int FilterBase::OnPreCommand(const std::string &command, const char* const* para
if ((parting) && (f->action == "kill"))
{
user->WriteServ("NOTICE %s :*** Your PART message was filtered: %s", user->nick, f->reason.c_str());
- User::QuitUser(ServerInstance, user, "Filtered: " + f->reason);
+ ServerInstance->Users->QuitUser(user, "Filtered: " + f->reason);
}
if (f->action == "gline")
{
diff --git a/src/modules/m_jumpserver.cpp b/src/modules/m_jumpserver.cpp
index d0c692d0c..5593b482a 100644
--- a/src/modules/m_jumpserver.cpp
+++ b/src/modules/m_jumpserver.cpp
@@ -90,7 +90,7 @@ class CommandJumpserver : public Command
if (!IS_OPER(t))
{
t->WriteNumeric(10, "%s %s %s :Please use this Server/Port instead", user->nick, parameters[0], parameters[1]);
- User::QuitUser(ServerInstance, t, reason);
+ ServerInstance->Users->QuitUser(t, reason);
n_done++;
}
}
@@ -142,7 +142,7 @@ class ModuleJumpServer : public Module
if (js->port && js->redirect_new_users)
{
user->WriteNumeric(10, "%s %s %d :Please use this Server/Port instead", user->nick, js->redirect_to.c_str(), js->port);
- User::QuitUser(ServerInstance, user, js->reason);
+ ServerInstance->Users->QuitUser(user, js->reason);
return 0;
}
return 0;
diff --git a/src/modules/m_lockserv.cpp b/src/modules/m_lockserv.cpp
index 9c9baa522..f1d6e764f 100644
--- a/src/modules/m_lockserv.cpp
+++ b/src/modules/m_lockserv.cpp
@@ -106,7 +106,7 @@ public:
{
if (locked)
{
- User::QuitUser(ServerInstance, user, "Server is temporarily closed. Please try again later.");
+ ServerInstance->Users->QuitUser(user, "Server is temporarily closed. Please try again later.");
return 1;
}
return 0;
diff --git a/src/modules/m_nicklock.cpp b/src/modules/m_nicklock.cpp
index 090481d06..8fae46279 100644
--- a/src/modules/m_nicklock.cpp
+++ b/src/modules/m_nicklock.cpp
@@ -58,8 +58,8 @@ class CommandNicklock : public Command
if (!target->ForceNickChange(parameters[1]))
{
- // ugh, nickchange failed for some reason -- possibly existing nick?
- User::QuitUser(ServerInstance, target, "Nickname collision");
+ // ugh, nickchange failed for some reason -- possibly existing nick? XXX change to UID here
+ ServerInstance->Users->QuitUser(target, "Nickname collision");
}
// give them a lock flag
diff --git a/src/modules/m_proxyscan.cpp b/src/modules/m_proxyscan.cpp
index f0882b53e..ba6f17daa 100644
--- a/src/modules/m_proxyscan.cpp
+++ b/src/modules/m_proxyscan.cpp
@@ -289,7 +289,7 @@ class ProxySocket : public EventHandler
if (match == true)
{
- User::QuitUser(ServerInstance, this->user, "Open proxy detected.");
+ ServerInstance->Users->QuitUser(this->user, "Open proxy detected.");
}
/* Close (but dont delete from memory) our socket
diff --git a/src/modules/m_saquit.cpp b/src/modules/m_saquit.cpp
index 704ae4c14..17ccd713d 100644
--- a/src/modules/m_saquit.cpp
+++ b/src/modules/m_saquit.cpp
@@ -46,7 +46,7 @@ class CommandSaquit : public Command
if (!IS_LOCAL(dest))
return CMD_SUCCESS;
- User::QuitUser(ServerInstance, dest, line);
+ ServerInstance->Users->QuitUser(dest, line);
return CMD_SUCCESS;
}
else
diff --git a/src/modules/m_spanningtree/kill.cpp b/src/modules/m_spanningtree/kill.cpp
index 5e7739c62..ca68867e6 100644
--- a/src/modules/m_spanningtree/kill.cpp
+++ b/src/modules/m_spanningtree/kill.cpp
@@ -43,7 +43,7 @@ bool TreeSocket::RemoteKill(const std::string &prefix, std::deque<std::string> &
// NOTE: This is safe with kill hiding on, as RemoteKill is only reached if we have a server prefix.
// in short this is not executed for USERS.
who->Write(":%s KILL %s :%s (%s)", prefix.c_str(), who->nick, prefix.c_str(), reason.c_str());
- User::QuitUser(this->Instance,who,reason);
+ this->Instance->Users->QuitUser(who, reason);
}
return true;
}
diff --git a/src/modules/m_spanningtree/svsnick.cpp b/src/modules/m_spanningtree/svsnick.cpp
index 82bcd1ff0..adf8f012e 100644
--- a/src/modules/m_spanningtree/svsnick.cpp
+++ b/src/modules/m_spanningtree/svsnick.cpp
@@ -54,7 +54,7 @@ bool TreeSocket::ForceNick(const std::string &prefix, std::deque<std::string> &p
/* buh. UID them */
if (!u->ForceNickChange(u->uuid))
{
- User::QuitUser(this->Instance, u, "Nickname collision");
+ this->Instance->Users->QuitUser(u, "Nickname collision");
return true;
}
}
diff --git a/src/modules/m_spanningtree/treeserver.cpp b/src/modules/m_spanningtree/treeserver.cpp
index 43825cc74..0b21a462d 100644
--- a/src/modules/m_spanningtree/treeserver.cpp
+++ b/src/modules/m_spanningtree/treeserver.cpp
@@ -186,9 +186,9 @@ int TreeServer::QuitUsers(const std::string &reason)
if (!IS_LOCAL(a))
{
if (ServerInstance->Config->HideSplits)
- User::QuitUser(ServerInstance, a, "*.net *.split", reason_s);
+ ServerInstance->Users->QuitUser(a, "*.net *.split", reason_s);
else
- User::QuitUser(ServerInstance, a, reason_s);
+ ServerInstance->Users->QuitUser(a, reason_s);
if (this->Utils->quiet_bursts)
ServerInstance->GlobalCulls.MakeSilent(a);