]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/typedefs.h
Add support for sending a standard reply with no command name.
[user/henk/code/inspircd.git] / include / typedefs.h
index 62ceb564e5ba242959462b87236e589375861526..3222c5d2f03429baa90bd46f196a1c5055ceaad7 100644 (file)
@@ -1,9 +1,12 @@
 /*
  * InspIRCd -- Internet Relay Chat Daemon
  *
- *   Copyright (C) 2009 Daniel De Graaf <danieldg@inspircd.org>
- *   Copyright (C) 2005, 2008 Craig Edwards <craigedwards@brainbox.cc>
+ *   Copyright (C) 2013, 2016, 2018, 2020 Sadie Powell <sadie@witchery.services>
+ *   Copyright (C) 2012-2014, 2016, 2018 Attila Molnar <attilamolnar@hush.com>
+ *   Copyright (C) 2012 Robby <robby@chatbelgie.be>
+ *   Copyright (C) 2009-2010 Daniel De Graaf <danieldg@inspircd.org>
  *   Copyright (C) 2007 Dennis Friis <peavey@inspircd.org>
+ *   Copyright (C) 2005, 2010 Craig Edwards <brain@inspircd.org>
  *
  * 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
@@ -49,6 +52,35 @@ class XLineFactory;
 struct ConnectClass;
 struct ModResult;
 
+namespace ClientProtocol
+{
+       class Event;
+       class EventProvider;
+       class Message;
+       class MessageTagEvent;
+       class MessageTagProvider;
+       class Serializer;
+
+       typedef std::vector<Message*> MessageList;
+       typedef std::vector<std::string> ParamList;
+       typedef std::string SerializedMessage;
+
+       struct MessageTagData
+       {
+               MessageTagProvider* tagprov;
+               std::string value;
+               void* provdata;
+
+               MessageTagData(MessageTagProvider* prov, const std::string& val, void* data = NULL);
+       };
+
+       /** Map of message tag values and providers keyed by their name.
+        * Sorted in descending order to ensure tag names beginning with symbols (such as '+') come later when iterating
+        * the container than tags with a normal name.
+        */
+       typedef insp::flat_map<std::string, MessageTagData, std::greater<std::string> > TagMap;
+}
+
 #include "hashcomp.h"
 #include "base.h"
 
@@ -82,10 +114,6 @@ typedef std::map<std::string, file_cache> ConfigFileCache;
 /** Generic user list, used for exceptions */
 typedef std::set<User*> CUList;
 
-/** A set of strings.
- */
-typedef std::vector<std::string> string_list;
-
 /** Contains an ident and host split into two strings
  */
 typedef std::pair<std::string, std::string> IdentHostPair;