- List[I_OnRehash] = 1;
- }
-
- virtual void OnRehash(userrec* user, const std::string ¶meter)
- {
- DELETE(Conf);
- Conf = new ConfigReader(ServerInstance);
- }
-
- virtual Version GetVersion()
- {
- return Version(1,1,0,1,VF_VENDOR,API_VERSION);
- }
-
-};
+ CustomVhostMap newhosts;
+ ConfigTagList tags = ServerInstance->Config->ConfTags("vhost");
+ for (ConfigIter i = tags.first; i != tags.second; ++i)
+ {
+ ConfigTag* tag = i->second;
+ std::string mask = tag->getString("host");
+ if (mask.empty())
+ throw ModuleException("<vhost:host> is empty! at " + tag->getTagLocation());
+ std::string username = tag->getString("user");
+ if (username.empty())
+ throw ModuleException("<vhost:user> is empty! at " + tag->getTagLocation());
+ std::string pass = tag->getString("pass");
+ if (pass.empty())
+ throw ModuleException("<vhost:pass> is empty! at " + tag->getTagLocation());
+ std::string hash = tag->getString("hash");