X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fmodules%2Fctctags.h;h=5f102b5d725e415f913abbf6894169c9831538c1;hb=9ebda853f5bc470858501897442610699a5fd5de;hp=68b8bcfdc762b3699d89085a04277d66b0826372;hpb=2bf0722dde6938f3c423b0c3c8c494ce3f64437d;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/modules/ctctags.h b/include/modules/ctctags.h index 68b8bcfdc..5f102b5d7 100644 --- a/include/modules/ctctags.h +++ b/include/modules/ctctags.h @@ -1,7 +1,7 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2018 Sadie Powell + * Copyright (C) 2018, 2020 Sadie Powell * * 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 @@ -20,14 +20,25 @@ #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: @@ -40,7 +51,7 @@ private: PushParam(rawtarget); } else - PushParamRef(target); + PushParam(target); } public: @@ -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) { } @@ -122,7 +137,7 @@ class CTCTags::EventListener * message, or MOD_RES_PASSTHRU to let another module handle the event. */ virtual ModResult OnUserPreTagMessage(User* user, const MessageTarget& target, TagMessageDetails& details) { return MOD_RES_PASSTHRU; } - + /** Called immediately after a user sends a tag message to a channel, a user, or a server glob mask. * @param user The user sending the message. * @param target The target of the message. This can either be a channel, a user, or a server