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 --- src/modules/m_vhost.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/modules/m_vhost.cpp') diff --git a/src/modules/m_vhost.cpp b/src/modules/m_vhost.cpp index 18c2a1eb0..1fac18514 100644 --- a/src/modules/m_vhost.cpp +++ b/src/modules/m_vhost.cpp @@ -27,11 +27,10 @@ class CommandVhost : public Command CmdResult Handle (const std::vector ¶meters, User *user) { - for (int index = 0;; index++) + ConfigTagList tags = ServerInstance->Config->ConfTags("vhost"); + for(ConfigIter i = tags.first; i != tags.second; ++i) { - ConfigTag* tag = ServerInstance->Config->ConfValue("vhost", index); - if (!tag) - break; + ConfigTag* tag = i->second; std::string mask = tag->getString("host"); std::string username = tag->getString("user"); std::string pass = tag->getString("pass"); -- cgit v1.2.3