]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/modules/ctctags.h
Add a CapReference class for the message-tags capability.
[user/henk/code/inspircd.git] / include / modules / ctctags.h
index 84fd7e93efb15c58c229acdfba711f42ca9d5479..7946c124349248206a072a8308f32cfbce004d51 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * InspIRCd -- Internet Relay Chat Daemon
  *
- *   Copyright (C) 2018 Sadie Powell <sadie@witchery.services>
+ *   Copyright (C) 2018, 2020 Sadie Powell <sadie@witchery.services>
  *
  * This file is part of InspIRCd.  InspIRCd is free software: you can
  * redistribute it and/or modify it under the terms of the GNU General Public
 #pragma once
 
 #include "event.h"
+#include "modules/cap.h"
 
 namespace CTCTags
 {
+       class CapReference;
        class EventListener;
        class TagMessage;
        class TagMessageDetails;
 }
 
+class CTCTags::CapReference : public Cap::Reference
+{
+ public:
+       CapReference(Module* mod)
+               : Cap::Reference(mod, "message-tags")
+       {
+       }
+};
+
 class CTCTags::TagMessage : public ClientProtocol::Message
 {
 private:
@@ -85,6 +96,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 +111,7 @@ class CTCTags::TagMessageDetails
        TagMessageDetails(const ClientProtocol::TagMap& tags)
                : echo(true)
                , echo_original(false)
+               , update_idle(true)
                , tags_in(tags)
        {
        }