diff options
-rw-r--r-- | include/message.h | 4 | ||||
-rw-r--r-- | include/modules/ctctags.h | 4 | ||||
-rw-r--r-- | src/coremods/core_message.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_ircv3_ctctags.cpp | 2 |
4 files changed, 10 insertions, 2 deletions
diff --git a/include/message.h b/include/message.h index 3a7c7018e..eae27ff94 100644 --- a/include/message.h +++ b/include/message.h @@ -39,6 +39,9 @@ class CoreExport MessageDetails /* Whether to send the original message back to clients with echo-message support. */ bool echo_original; + /** Whether to update the source user's idle time. */ + bool update_idle; + /** The users who are exempted from receiving this message. */ CUList exemptions; @@ -78,6 +81,7 @@ class CoreExport MessageDetails MessageDetails(MessageType mt, const std::string& msg, const ClientProtocol::TagMap& tags) : echo(true) , echo_original(false) + , update_idle(true) , original_text(msg) , tags_in(tags) , text(msg) diff --git a/include/modules/ctctags.h b/include/modules/ctctags.h index f1af43c09..ad45d12b1 100644 --- a/include/modules/ctctags.h +++ b/include/modules/ctctags.h @@ -85,6 +85,9 @@ class CTCTags::TagMessageDetails /* Whether to send the original tags back to clients with echo-message support. */ bool echo_original; + /** Whether to update the source user's idle time. */ + bool update_idle; + /** The users who are exempted from receiving this message. */ CUList exemptions; @@ -97,6 +100,7 @@ class CTCTags::TagMessageDetails TagMessageDetails(const ClientProtocol::TagMap& tags) : echo(true) , echo_original(false) + , update_idle(true) , tags_in(tags) { } diff --git a/src/coremods/core_message.cpp b/src/coremods/core_message.cpp index 648172b57..1093aad67 100644 --- a/src/coremods/core_message.cpp +++ b/src/coremods/core_message.cpp @@ -128,7 +128,7 @@ namespace { // If the source is local and was not sending a CTCP reply then update their idle time. LocalUser* lsource = IS_LOCAL(source); - if (lsource && (msgdetails.type != MSG_NOTICE || !msgdetails.IsCTCP())) + if (lsource && msgdetails.update_idle && (msgdetails.type != MSG_NOTICE || !msgdetails.IsCTCP())) lsource->idle_lastmsg = ServerInstance->Time(); // Inform modules that a message was sent. diff --git a/src/modules/m_ircv3_ctctags.cpp b/src/modules/m_ircv3_ctctags.cpp index 421bf89c3..1bb803bc2 100644 --- a/src/modules/m_ircv3_ctctags.cpp +++ b/src/modules/m_ircv3_ctctags.cpp @@ -57,7 +57,7 @@ class CommandTagMsg : public Command { // If the source is local then update its idle time. LocalUser* lsource = IS_LOCAL(source); - if (lsource) + if (lsource && msgdetails.update_idle) lsource->idle_lastmsg = ServerInstance->Time(); // Inform modules that a TAGMSG was sent. |