+ ConfigTagList tags = ServerInstance->Config->ConfTags("title");
+ CustomVhostMap newtitles;
+ for (ConfigIter i = tags.first; i != tags.second; ++i)
+ {
+ reference<ConfigTag> tag = i->second;
+ std::string name = tag->getString("name", "", 1);
+ if (name.empty())
+ throw ModuleException("<title:name> is empty at " + tag->getTagLocation());
+
+ std::string pass = tag->getString("password");
+ if (pass.empty())
+ throw ModuleException("<title:password> is empty at " + tag->getTagLocation());
+
+ const std::string hash = tag->getString("hash", "plaintext", 1);
+ if (stdalgo::string::equalsci(hash, "plaintext"))
+ {
+ ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "<title> tag for %s at %s contains an plain text password, this is insecure!",
+ name.c_str(), tag->getTagLocation().c_str());
+ }
+
+ std::string host = tag->getString("host", "*@*", 1);
+ std::string title = tag->getString("title");
+ std::string vhost = tag->getString("vhost");
+ CustomTitle config(name, pass, hash, host, title, vhost);
+ newtitles.insert(std::make_pair(name, config));
+ }
+ cmd.configs.swap(newtitles);