]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/typedefs.h
Remove the Kiwi links from the readme.
[user/henk/code/inspircd.git] / include / typedefs.h
index 8f9a6488887ac6ac545423d2e22ededaf6ac07f2..8a7b591590b6a3949ef657b01e124eb16e603b27 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
@@ -31,6 +34,7 @@ class Extensible;
 class FakeUser;
 class InspIRCd;
 class Invitation;
+class IOHookProvider;
 class LocalUser;
 class Membership;
 class Module;
@@ -46,7 +50,36 @@ class XLine;
 class XLineManager;
 class XLineFactory;
 struct ConnectClass;
-struct ModResult;
+class 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"
@@ -54,13 +87,6 @@ struct ModResult;
 typedef TR1NS::unordered_map<std::string, User*, irc::insensitive, irc::StrHashComp> user_hash;
 typedef TR1NS::unordered_map<std::string, Channel*, irc::insensitive, irc::StrHashComp> chan_hash;
 
-/** A list holding local users, this is the type of UserManager::local_users
- */
-typedef intrusive_list<LocalUser> LocalUserList;
-
-/** A list of failed port bindings, used for informational purposes on startup */
-typedef std::vector<std::pair<std::string, std::string> > FailedPortList;
-
 /** List of channels to consider when building the neighbor list of a user
  */
 typedef std::vector<Membership*> IncludeChanList;
@@ -69,13 +95,13 @@ typedef std::vector<Membership*> IncludeChanList;
  */
 typedef std::vector<std::string> file_cache;
 
-/** A configuration key and value pair
+/** A mapping of configuration keys to their assigned values.
  */
-typedef std::pair<std::string, std::string> KeyVal;
+typedef insp::flat_map<std::string, std::string, irc::insensitive_swo> ConfigItems;
 
 /** The entire configuration
  */
-typedef std::multimap<std::string, reference<ConfigTag> > ConfigDataHash;
+typedef std::multimap<std::string, reference<ConfigTag>, irc::insensitive_swo> ConfigDataHash;
 
 /** Iterator of ConfigDataHash */
 typedef ConfigDataHash::const_iterator ConfigIter;
@@ -88,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;
@@ -102,7 +124,7 @@ typedef std::map<std::string, XLineFactory*> XLineFactMap;
 
 /** A map of XLines indexed by string
  */
-typedef std::map<irc::string, XLine *> XLineLookup;
+typedef std::map<std::string, XLine*, irc::insensitive_swo> XLineLookup;
 
 /** A map of XLineLookup maps indexed by string
  */
@@ -112,6 +134,11 @@ typedef std::map<std::string, XLineLookup > XLineContainer;
  */
 typedef XLineContainer::iterator ContainerIter;
 
-/** An interator in an XLineLookup
+/** An iterator in an XLineLookup
  */
 typedef XLineLookup::iterator LookupIter;
+
+namespace Stats
+{
+       class Context;
+}