summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/users.h4
-rw-r--r--src/cull_list.cpp29
-rw-r--r--src/users.cpp1
3 files changed, 15 insertions, 19 deletions
diff --git a/include/users.h b/include/users.h
index 9d210931c..4d7b074b6 100644
--- a/include/users.h
+++ b/include/users.h
@@ -620,6 +620,10 @@ class CoreExport User : public connection
*/
std::string operquitmsg;
+ /** Whether or not to send an snotice about this user's quitting
+ */
+ bool quietquit;
+
/** Flood counters - lines received
*/
unsigned int lines_in;
diff --git a/src/cull_list.cpp b/src/cull_list.cpp
index 9a3c088e8..2b769e893 100644
--- a/src/cull_list.cpp
+++ b/src/cull_list.cpp
@@ -33,15 +33,7 @@ void CullList::AddItem(User* user)
void CullList::MakeSilent(User* user)
{
-/* for (std::vector<CullItem *>::iterator a = list.begin(); a != list.end(); ++a)
- {
- if ((*a)->GetUser() == user)
- {
- (*a)->MakeSilent();
- break;
- }
- }
-*/
+ user->quietquit = true;
return;
}
@@ -111,18 +103,17 @@ int CullList::Apply()
{
if (IS_LOCAL(u))
{
- // XXX
- // if (!(*a)->IsSilent())
- // {
- // ServerInstance->SNO->WriteToSnoMask('q',"Client exiting: %s!%s@%s [%s]",u->nick,u->ident,u->host,oper_reason.c_str());
- // }
+ if (!u->quietquit)
+ {
+ ServerInstance->SNO->WriteToSnoMask('q',"Client exiting: %s!%s@%s [%s]",u->nick,u->ident,u->host,oper_reason.c_str());
+ }
}
else
{
- // if ((!ServerInstance->SilentULine(u->server)) && (!(*a)->IsSilent()))
- // {
+ if ((!ServerInstance->SilentULine(u->server)) && (!u->quietquit))
+ {
ServerInstance->SNO->WriteToSnoMask('Q',"Client exiting on server %s: %s!%s@%s [%s]",u->server,u->nick,u->ident,u->host,oper_reason.c_str());
- // }
+ }
}
u->AddToWhoWas();
}
@@ -136,13 +127,13 @@ int CullList::Apply()
ServerInstance->local_users.erase(x);
}
ServerInstance->clientlist->erase(iter);
- delete u;
}
- // delete *list.begin();
+ delete u;
list.erase(list.begin());
exempt.erase(exemptiter);
}
+
return n;
}
diff --git a/src/users.cpp b/src/users.cpp
index 1d2b16dee..f2c2d9ae4 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -709,6 +709,7 @@ void User::QuitUser(InspIRCd* Instance, User *user, const std::string &quitreaso
Instance->Log(DEBUG,"QuitUser: %s '%s'", user->nick, quitreason.c_str());
user->Write("ERROR :Closing link (%s@%s) [%s]", user->ident, user->host, *operreason ? operreason : quitreason.c_str());
user->muted = true;
+ user->quietquit = false;
user->quitmsg = quitreason;
user->operquitmsg = operreason;
Instance->GlobalCulls.AddItem(user);