]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_vhost.cpp
Replace [cC]olour with [cC]olor
[user/henk/code/inspircd.git] / src / modules / m_vhost.cpp
index 18c2a1eb059fbded40b417dccd88fe47c5576a14..704e769b3311f66fe06145c5bbc1a100959eb4e1 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2010 InspIRCd Development Team
  * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
@@ -27,11 +27,10 @@ class CommandVhost : public Command
 
        CmdResult Handle (const std::vector<std::string> &parameters, 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");