diff options
Diffstat (limited to 'src/modules/m_vhost.cpp')
-rw-r--r-- | src/modules/m_vhost.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
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<std::string> ¶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"); |