X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_vhost.cpp;h=704e769b3311f66fe06145c5bbc1a100959eb4e1;hb=cbd32e195f5f574653550a3ed4954168ace30c55;hp=18c2a1eb059fbded40b417dccd88fe47c5576a14;hpb=a59d08fffd3dc8a9850ce34c9928fb6382b9b37f;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_vhost.cpp b/src/modules/m_vhost.cpp index 18c2a1eb0..704e769b3 100644 --- a/src/modules/m_vhost.cpp +++ b/src/modules/m_vhost.cpp @@ -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 ¶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");