summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/users.h8
-rw-r--r--src/command_parse.cpp8
-rw-r--r--src/commands/cmd_kill.cpp1
-rw-r--r--src/inspircd.cpp6
-rw-r--r--src/userprocess.cpp2
-rw-r--r--src/users.cpp5
6 files changed, 13 insertions, 17 deletions
diff --git a/include/users.h b/include/users.h
index 4d7b074b6..a452ec014 100644
--- a/include/users.h
+++ b/include/users.h
@@ -632,11 +632,11 @@ class CoreExport User : public connection
*/
time_t reset_due;
- /** If this is set to true, then all read operations for the user
+ /** If this is set to true, then all socket operations for the user
* are dropped into the bit-bucket.
- * This is used by the global CullList, but please note that setting this value
- * alone will NOT cause the user to quit. This means it can be used seperately,
- * for example by shun modules etc.
+ * This value is set by QuitUser, and is not needed seperately from that call.
+ * Please note that setting this value alone will NOT cause the user to quit.
+ * This means it can be used seperately, for example by shun modules etc.
*/
bool muted;
diff --git a/src/command_parse.cpp b/src/command_parse.cpp
index d82f523db..82209015c 100644
--- a/src/command_parse.cpp
+++ b/src/command_parse.cpp
@@ -413,12 +413,10 @@ bool CommandParser::ProcessBuffer(std::string &buffer,User *user)
if (buffer.length())
{
- if (!user->muted)
- {
- ServerInstance->Log(DEBUG,"C[%d] I :%s %s",user->GetFd(), user->nick, buffer.c_str());
- return this->ProcessCommand(user,buffer);
- }
+ ServerInstance->Log(DEBUG,"C[%d] I :%s %s",user->GetFd(), user->nick, buffer.c_str());
+ return this->ProcessCommand(user,buffer);
}
+
return true;
}
diff --git a/src/commands/cmd_kill.cpp b/src/commands/cmd_kill.cpp
index 9b4dbbf1a..675532a3c 100644
--- a/src/commands/cmd_kill.cpp
+++ b/src/commands/cmd_kill.cpp
@@ -98,7 +98,6 @@ CmdResult CommandKill::Handle (const char** parameters, int pcnt, User *user)
user->dhost,
*ServerInstance->Config->HideKillsServer ? ServerInstance->Config->HideKillsServer : user->nick,
parameters[1]);
- u->muted = true;
}
}
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 8b56706dd..9318a03fd 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -625,9 +625,6 @@ int InspIRCd::Run()
*/
if (TIME != OLDTIME)
{
- /* if any users were quit, take them out */
- this->GlobalCulls.Apply();
-
if (TIME < OLDTIME)
{
WriteOpers("*** \002EH?!\002 -- Time is flowing BACKWARDS in this dimension! Clock drifted backwards %d secs.",abs(OLDTIME-TIME));
@@ -677,6 +674,9 @@ int InspIRCd::Run()
*/
this->SE->DispatchEvents();
+ /* if any users were quit, take them out */
+ this->GlobalCulls.Apply();
+
/* If any inspsockets closed, remove them */
this->BufferedSocketCull();
diff --git a/src/userprocess.cpp b/src/userprocess.cpp
index 7a1938d2c..5ec2581f7 100644
--- a/src/userprocess.cpp
+++ b/src/userprocess.cpp
@@ -190,7 +190,6 @@ void InspIRCd::DoBackgroundUserStuff()
* registration timeout -- didnt send USER/NICK/HOST
* in the time specified in their connection class.
*/
- curr->muted = true;
User::QuitUser(this, curr, "Registration timeout");
continue;
}
@@ -220,7 +219,6 @@ void InspIRCd::DoBackgroundUserStuff()
time_t time = this->Time(false) - (curr->nping - curr->MyClass->GetPingTime());
char message[MAXBUF];
snprintf(message, MAXBUF, "Ping timeout: %ld second%s", (long)time, time > 1 ? "s" : "");
- curr->muted = true;
curr->lastping = 1;
curr->nping = TIME + curr->MyClass->GetPingTime();
User::QuitUser(this, curr, message);
diff --git a/src/users.cpp b/src/users.cpp
index f2c2d9ae4..538f8d33b 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -785,7 +785,6 @@ void User::FullConnect()
if (r)
{
- this->muted = true;
r->Apply(this);
return;
}
@@ -794,7 +793,6 @@ void User::FullConnect()
if (n)
{
- this->muted = true;
n->Apply(this);
return;
}
@@ -1702,6 +1700,9 @@ void User::ShowRULES()
void User::HandleEvent(EventType et, int errornum)
{
+ if (this->muted) // drop everything, user is due to be quit
+ return;
+
/* WARNING: May delete this user! */
int thisfd = this->GetFd();