summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2018-04-27 14:30:06 +0100
committerPeter Powell <petpow@saberuk.com>2018-08-26 11:33:19 +0100
commit4567a325b8cfc87ddf1aea1c0db7623d3b068931 (patch)
tree6f822c442abff8174c0e375b0d088a5dbfb08fa4 /include
parent9d1b92d927028dfd89acb5c71f671c9d7f203494 (diff)
Implement proper CTCP parsing in MessageDetails.
Diffstat (limited to 'include')
-rw-r--r--include/message.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/message.h b/include/message.h
index 8c7c7592a..7a968d866 100644
--- a/include/message.h
+++ b/include/message.h
@@ -56,6 +56,24 @@ class CoreExport MessageDetails
/** The type of message. */
const MessageType type;
+ /** Determines whether the specified message is a CTCP. If the specified message
+ * is a CTCP then the CTCP name and CTCP body are extracted and stored in the
+ * name and body references.
+ * @param name The location to store the parsed CTCP name.
+ * @param body The location to store the parsed CTCP body.
+ */
+ virtual bool IsCTCP(std::string& name, std::string& body) const = 0;
+
+ /** Determines whether the specified message is a CTCP. If the specified message
+ * is a CTCP then the CTCP name is extracted and stored in the name reference.
+ * @param name The location to store the parsed CTCP name.
+ */
+ virtual bool IsCTCP(std::string& name) const = 0;
+
+ /** Determines whether the specified message is a CTCP. */
+ virtual bool IsCTCP() const = 0;
+
+ protected:
MessageDetails(MessageType mt, const std::string& msg, const ClientProtocol::TagMap& tags)
: echo(true)
, echo_original(false)