Backported Shawn's NoSnoticeStack code from insp21

This commit is contained in:
Robby- 2012-04-15 10:45:34 +02:00
parent 207c6c290e
commit c376d800eb
4 changed files with 11 additions and 2 deletions

View File

@ -598,7 +598,11 @@
# invitebypassmodes: This allows /invite to bypass other channel modes.
# (Such as +k, +j, +l, etc)
invitebypassmodes="yes">
invitebypassmodes="yes"
# nosnoticestack: This prevents snotices from 'stacking' and giving you
# the message saying '(last message repeated X times)'. Defaults to no.
nosnoticestack="no">
#-#-#-#-#-#-#-#-#-#-#-# PERFORMANCE CONFIGURATION #-#-#-#-#-#-#-#-#-#-#

View File

@ -581,6 +581,10 @@ class CoreExport ServerConfig
*/
bool InvBypassModes;
/** If this value is true, snotices will not stack when repeats are sent
*/
bool NoSnoticeStack;
};
/** The background thread for config reading, so that reading from executable includes

View File

@ -505,6 +505,7 @@ void ServerConfig::Fill()
Limits.MaxGecos = ConfValue("limits")->getInt("maxgecos", 128);
Limits.MaxAway = ConfValue("limits")->getInt("maxaway", 200);
InvBypassModes = options->getBool("invitebypassmodes", true);
NoSnoticeStack = options->getBool("nosnoticestack", false);
range(SoftLimit, 10, ServerInstance->SE->GetMaxFds(), ServerInstance->SE->GetMaxFds(), "<performance:softlimit>");
range(MaxConn, 0, SOMAXCONN, SOMAXCONN, "<performance:somaxconn>");

View File

@ -83,7 +83,7 @@ SnomaskManager::SnomaskManager()
void Snomask::SendMessage(const std::string &message, char mysnomask)
{
if (message != LastMessage || mysnomask != LastLetter)
if (ServerInstance->Config->NoSnoticeStack || message != LastMessage || mysnomask != LastLetter)
{
this->Flush();
LastMessage = message;