2 * InspIRCd -- Internet Relay Chat Daemon
4 * Copyright (C) 2009 Daniel De Graaf <danieldg@inspircd.org>
5 * Copyright (C) 2005, 2008 Craig Edwards <craigedwards@brainbox.cc>
6 * Copyright (C) 2007 Dennis Friis <peavey@inspircd.org>
8 * This file is part of InspIRCd. InspIRCd is free software: you can
9 * redistribute it and/or modify it under the terms of the GNU General Public
10 * License as published by the Free Software Foundation, version 2.
12 * This program is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
25 class BanCacheManager;
54 struct ResourceRecord;
59 #if defined(WINDOWS) && !defined(HASHMAP_DEPRECATED)
60 typedef nspace::hash_map<std::string, User*, nspace::hash_compare<std::string, std::less<std::string> > > user_hash;
61 typedef nspace::hash_map<std::string, Channel*, nspace::hash_compare<std::string, std::less<std::string> > > chan_hash;
63 #ifdef HASHMAP_DEPRECATED
64 typedef nspace::hash_map<std::string, User*, nspace::insensitive, irc::StrHashComp> user_hash;
65 typedef nspace::hash_map<std::string, Channel*, nspace::insensitive, irc::StrHashComp> chan_hash;
67 typedef nspace::hash_map<std::string, User*, nspace::hash<std::string>, irc::StrHashComp> user_hash;
68 typedef nspace::hash_map<std::string, Channel*, nspace::hash<std::string>, irc::StrHashComp> chan_hash;
72 /** A list of failed port bindings, used for informational purposes on startup */
73 typedef std::vector<std::pair<std::string, std::string> > FailedPortList;
75 /** Holds a complete list of all channels to which a user has been invited and has not yet joined, and the time at which they'll expire.
77 typedef std::vector<Invitation*> InviteList;
79 /** Holds a complete list of all allow and deny tags from the configuration file (connection classes)
81 typedef std::vector<reference<ConnectClass> > ClassVector;
83 /** Typedef for the list of user-channel records for a user
85 typedef std::set<Channel*> UserChanList;
87 /** Shorthand for an iterator into a UserChanList
89 typedef UserChanList::iterator UCListIter;
91 /** Holds a complete ban list
93 typedef std::vector<BanItem> BanList;
95 /** A list of custom modes parameters on a channel
97 typedef std::map<char,std::string> CustomModeList;
99 /** A cached text file stored with its contents as lines
101 typedef std::vector<std::string> file_cache;
103 /** A configuration key and value pair
105 typedef std::pair<std::string, std::string> KeyVal;
107 /** The entire configuration
109 typedef std::multimap<std::string, reference<ConfigTag> > ConfigDataHash;
111 /** Iterator of ConfigDataHash */
112 typedef ConfigDataHash::const_iterator ConfigIter;
113 /** Iterator pair, used for tag-name ranges */
114 typedef std::pair<ConfigIter,ConfigIter> ConfigTagList;
116 /** Index of valid oper blocks and types */
117 typedef std::map<std::string, reference<OperInfo> > OperIndex;
119 /** Files read by the configuration */
120 typedef std::map<std::string, file_cache> ConfigFileCache;
122 /** A hash of commands used by the core
124 typedef nspace::hash_map<std::string,Command*> Commandtable;
126 /** Membership list of a channel */
127 typedef std::map<User*, Membership*> UserMembList;
128 /** Iterator of UserMembList */
129 typedef UserMembList::iterator UserMembIter;
130 /** const Iterator of UserMembList */
131 typedef UserMembList::const_iterator UserMembCIter;
133 /** Generic user list, used for exceptions */
134 typedef std::set<User*> CUList;
136 /** A set of strings.
138 typedef std::vector<std::string> string_list;
140 /** Contains an ident and host split into two strings
142 typedef std::pair<std::string, std::string> IdentHostPair;
144 /** A map of xline factories
146 typedef std::map<std::string, XLineFactory*> XLineFactMap;
148 /** A map of XLines indexed by string
150 typedef std::map<irc::string, XLine *> XLineLookup;
152 /** A map of XLineLookup maps indexed by string
154 typedef std::map<std::string, XLineLookup > XLineContainer;
156 /** An iterator in an XLineContainer
158 typedef XLineContainer::iterator ContainerIter;
160 /** An interator in an XLineLookup
162 typedef XLineLookup::iterator LookupIter;