# +b, as it may break some features in popular #
# clients such as mIRC. #
# #
+# quietbursts - When synching or splitting from the network, a #
+# server can generate a lot of connect and quit #
+# snotices to the +C and +Q snomasks. Setting this #
+# value to yes squelches those messages, which can #
+# make them more useful for opers, however it will #
+# degrade their use by certain third party programs #
+# such as BOPM which rely on them to scan users when #
+# a split heals in certain configurations. #
+# #
<options prefixquit="Quit: "
loglevel="default"
disablehmac="no"
hostintopic="yes"
hidemodes="eI"
+ quietbursts="yes"
allowhalfop="yes">
#-#-#-#-#-#-#-#-#-#-#-#-#-#- TIME SYNC OPTIONS -#-#-#-#-#-#-#-#-#-#-#-#
/** Holds the quit reason opers see, if different from users
*/
std::string oper_reason;
+ /** Silent items dont generate an snotice.
+ */
+ bool silent;
public:
/** Constrcutor.
* Initializes the CullItem with a user pointer
CullItem(userrec* u, std::string &r, const char* ro = "");
CullItem(userrec* u, const char* r, const char* ro = "");
+ void MakeSilent();
+ bool IsSilent();
+
~CullItem();
/** Returns a pointer to the user
void AddItem(userrec* user, std::string &reason, const char* o_reason = "");
void AddItem(userrec* user, const char* reason, const char* o_reason = "");
+ /* Turn an item into a silent item
+ */
+ void MakeSilent(userrec* user);
+
/** Applies the cull list, quitting all the users
* on the list with their quit reasons all at once.
* This is a very fast operation compared to
{
this->user = u;
this->reason = r;
+ this->silent = false;
/* Seperate oper reason not set, use the user reason */
if (*o_reason)
this->oper_reason = o_reason;
{
this->user = u;
this->reason = r;
+ this->silent = false;
/* Seperate oper reason not set, use the user reason */
if (*o_reason)
this->oper_reason = o_reason;
this->oper_reason = r;
}
+void CullItem::MakeSilent()
+{
+ this->silent = true;
+}
+
+bool CullItem::IsSilent()
+{
+ return this->silent;
+}
+
CullItem::~CullItem()
{
}
}
}
+void CullList::MakeSilent(userrec* user)
+{
+ for (std::vector<CullItem>::iterator a = list.begin(); a != list.end(); ++a)
+ {
+ if (a->GetUser() == user)
+ {
+ a->MakeSilent();
+ break;
+ }
+ }
+ return;
+}
+
int CullList::Apply()
{
int n = list.size();
if (a->GetUser()->registered == REG_ALL)
{
if (IS_LOCAL(a->GetUser()))
- ServerInstance->SNO->WriteToSnoMask('q',"Client exiting: %s!%s@%s [%s]",a->GetUser()->nick,a->GetUser()->ident,a->GetUser()->host,oper_reason.c_str());
+ if (!a->IsSilent())
+ ServerInstance->SNO->WriteToSnoMask('q',"Client exiting: %s!%s@%s [%s]",a->GetUser()->nick,a->GetUser()->ident,a->GetUser()->host,oper_reason.c_str());
else
{
if (!ServerInstance->SilentULine(a->GetUser()->server))
- ServerInstance->SNO->WriteToSnoMask('Q',"Client exiting on server %s: %s!%s@%s [%s]",a->GetUser()->server,a->GetUser()->nick,a->GetUser()->ident,a->GetUser()->host,oper_reason.c_str());
+ if (!a->IsSilent())
+ ServerInstance->SNO->WriteToSnoMask('Q',"Client exiting on server %s: %s!%s@%s [%s]",a->GetUser()->server,a->GetUser()->nick,a->GetUser()->ident,a->GetUser()->host,oper_reason.c_str());
}
a->GetUser()->AddToWhoWas();
}
userrec::QuitUser(ServerInstance, a, "*.net *.split", reason_s);
else
userrec::QuitUser(ServerInstance, a, reason_s);
+
+ if (this->Utils->quiet_bursts)
+ ServerInstance->GlobalCulls.MakeSilent(a);
}
}
return time_to_die.size();
Instance->AddGlobalClone(_new);
- if (!this->Instance->SilentULine(_new->server))
+ bool send = (!this->Instance->SilentULine(_new->server));
+ if (send)
+ send = (this->Utils->quiet_bursts && !this->bursting);
+
+ if (send)
this->Instance->SNO->WriteToSnoMask('C',"Client connecting at %s: %s!%s@%s [%s]",_new->server,_new->nick,_new->ident,_new->host, _new->GetIPString());
params[7] = ":" + params[7];
EnableTimeSync = Conf->ReadFlag("timesync","enable",0);
MasterTime = Conf->ReadFlag("timesync", "master", 0);
ChallengeResponse = !Conf->ReadFlag("options", "disablehmac", 0);
+ quiet_bursts = Conf->ReadFlag("options", "quietbursts", 0);
LinkBlocks.clear();
ValidIPs.clear();
for (int j =0; j < Conf->Enumerate("link"); j++)
/** Synchronize timestamps between servers
*/
bool EnableTimeSync;
+ /** Make snomasks +CQ quiet during bursts and splits
+ */
+ bool quiet_bursts;
/** Socket bindings for listening sockets
*/
std::vector<TreeSocket*> Bindings;