From d8f98565a8617658f610bc94a5d87266930beee4 Mon Sep 17 00:00:00 2001 From: danieldg Date: Wed, 21 Oct 2009 23:46:13 +0000 Subject: 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 --- include/configreader.h | 7 ++++++- include/users.h | 10 +++++----- 2 files changed, 11 insertions(+), 6 deletions(-) (limited to 'include') 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 > TagIndex; typedef std::map > OperIndex; +typedef ConfigDataHash::iterator ConfigIter; +typedef std::pair 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 > InvitedList; +typedef std::vector< std::pair > InvitedList; /** Holds a complete list of all allow and deny tags from the configuration file (connection classes) */ -CoreExport typedef std::vector > ClassVector; +typedef std::vector > ClassVector; /** Typedef for the list of user-channel records for a user */ -CoreExport typedef std::set UserChanList; +typedef std::set 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; -- cgit v1.2.3