summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-21 23:46:13 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-21 23:46:13 +0000
commitd8f98565a8617658f610bc94a5d87266930beee4 (patch)
tree365a153c59bc8b521b094c27f25b484a69e5154b /include
parent984cc96a1f832abf9b5fcfddcd8260c5b12bd2a9 (diff)
Use ConfigTagList as a faster access method for access to configuration
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11948 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r--include/configreader.h7
-rw-r--r--include/users.h10
2 files changed, 11 insertions, 6 deletions
diff --git a/include/configreader.h b/include/configreader.h
index 6afea4504..024e28909 100644
--- a/include/configreader.h
+++ b/include/configreader.h
@@ -143,6 +143,8 @@ class CoreExport OperInfo : public refcountbase
typedef std::map<std::string, reference<ConfigTag> > TagIndex;
typedef std::map<std::string, reference<OperInfo> > OperIndex;
+typedef ConfigDataHash::iterator ConfigIter;
+typedef std::pair<ConfigDataHash::iterator, ConfigDataHash::iterator> ConfigTagList;
/** This class holds the bulk of the runtime configuration for the ircd.
* It allows for reading new config values, accessing configuration files,
@@ -161,7 +163,9 @@ class CoreExport ServerConfig
* @param tag The name of the tag to get
* @param offset get the Nth occurance of the tag
*/
- ConfigTag* ConfValue(const std::string& tag, int offset = 0);
+ ConfigTag* ConfValue(const std::string& tag);
+
+ ConfigTagList ConfTags(const std::string& tag);
/** Error stream, contains error output from any failed configuration parsing.
*/
@@ -616,4 +620,5 @@ class CoreExport ServerConfig
bool InvBypassModes;
};
+
#endif
diff --git a/include/users.h b/include/users.h
index 241eed0c6..49e43f0bf 100644
--- a/include/users.h
+++ b/include/users.h
@@ -210,19 +210,19 @@ struct CoreExport ConnectClass : public refcountbase
/** 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.
*/
-CoreExport typedef std::vector< std::pair<irc::string, time_t> > InvitedList;
+typedef std::vector< std::pair<irc::string, time_t> > InvitedList;
/** Holds a complete list of all allow and deny tags from the configuration file (connection classes)
*/
-CoreExport typedef std::vector<reference<ConnectClass> > ClassVector;
+typedef std::vector<reference<ConnectClass> > ClassVector;
/** Typedef for the list of user-channel records for a user
*/
-CoreExport typedef std::set<Channel*> UserChanList;
+typedef std::set<Channel*> UserChanList;
/** Shorthand for an iterator into a UserChanList
*/
-CoreExport typedef UserChanList::iterator UCListIter;
+typedef UserChanList::iterator UCListIter;
/* Required forward declaration
*/
@@ -283,7 +283,7 @@ class CoreExport User : public StreamSocket
time_t idle_lastmsg;
/** Client address that the user is connected from.
- * Do not modify this value directly, use SetClientIP() to change it
+ * Do not modify this value directly, use SetClientIP() to change it.
* Port is not valid for remote users.
*/
irc::sockets::sockaddrs client_sa;