]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/modules/ircv3_batch.h
Use IsCTCP in blockcolor for ignoring CTCPs.
[user/henk/code/inspircd.git] / include / modules / ircv3_batch.h
index 841554bdbc5db2f4c00d26ed2bdbc4f87056db42..a5319dd2dcabf6b115323f2468be22bd61480c16 100644 (file)
@@ -1,7 +1,8 @@
 /*
  * InspIRCd -- Internet Relay Chat Daemon
  *
- *   Copyright (C) 2016 Attila Molnar <attilamolnar@hush.com>
+ *   Copyright (C) 2018-2020 Sadie Powell <sadie@witchery.services>
+ *   Copyright (C) 2018 Attila Molnar <attilamolnar@hush.com>
  *
  * 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
@@ -89,6 +90,7 @@ class IRCv3::Batch::Batch
        unsigned int bit;
        BatchInfo* batchinfo;
        ClientProtocol::Message* batchstartmsg;
+       ClientProtocol::Message* batchendmsg;
 
        void Setup(unsigned int b)
        {
@@ -110,6 +112,7 @@ class IRCv3::Batch::Batch
                , type(Type)
                , batchinfo(NULL)
                , batchstartmsg(NULL)
+               , batchendmsg(NULL)
        {
        }
 
@@ -158,6 +161,15 @@ class IRCv3::Batch::Batch
         */
        ClientProtocol::Message& GetBatchStartMessage() { return *batchstartmsg; }
 
+       /** Get the batch end client protocol message.
+        * The returned message object can be manipulated to add extra parameters or labels to the message. The first
+        * parameter of the message is the batch reference tag generated by the module providing batch support.
+        * If the batch type string was specified, it will be the second parameter of the message.
+        * May only be called if IsRunning() == true.
+        * @return Mutable batch end client protocol message.
+        */
+       ClientProtocol::Message& GetBatchEndMessage() { return *batchendmsg; }
+
        friend class ManagerImpl;
 };