diff options
author | Robin Burchell <viroteck@viroteck.net> | 2012-04-15 02:02:47 -0700 |
---|---|---|
committer | Robin Burchell <viroteck@viroteck.net> | 2012-04-15 02:02:47 -0700 |
commit | 9852b8b68b4a1ca8096dc3402da89930b91c36e4 (patch) | |
tree | 0ef95a6626ecce59d7c2dd2dbbb409c0bc370b37 | |
parent | ed1cdbef159f2e6a33eff966946fccfc08c37568 (diff) | |
parent | c376d800ebe6057f2afd7ffcd065b64e0cdb3292 (diff) |
Merge pull request #59 from Robby-/insp20-nosnoticestack
[2.0] Backported Shawn's NoSnoticeStack code from insp21
-rw-r--r-- | docs/inspircd.conf.example | 6 | ||||
-rw-r--r-- | include/configreader.h | 4 | ||||
-rw-r--r-- | src/configreader.cpp | 1 | ||||
-rw-r--r-- | src/snomasks.cpp | 2 |
4 files changed, 11 insertions, 2 deletions
diff --git a/docs/inspircd.conf.example b/docs/inspircd.conf.example index 322a6e820..a820d4a40 100644 --- a/docs/inspircd.conf.example +++ b/docs/inspircd.conf.example @@ -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 #-#-#-#-#-#-#-#-#-#-# diff --git a/include/configreader.h b/include/configreader.h index 8748e57f9..d828283c3 100644 --- a/include/configreader.h +++ b/include/configreader.h @@ -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 diff --git a/src/configreader.cpp b/src/configreader.cpp index a1a244501..eecf01d8d 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -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>"); diff --git a/src/snomasks.cpp b/src/snomasks.cpp index f8e1fc158..e0849147b 100644 --- a/src/snomasks.cpp +++ b/src/snomasks.cpp @@ -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; |