- ServerInstance->Logs->Log("CONFIG",DEFAULT, "There were errors in your configuration file: %s", errormessage.c_str());
- if (bail)
- {
- /* Unneeded because of the ServerInstance->Log() aboive? */
- printf("There were errors in your configuration:\n%s\n\n",errormessage.c_str());
- ServerInstance->Exit(EXIT_STATUS_CONFIG);
- }
- else
- {
- std::string errors = errormessage;
- std::string::size_type start;
- unsigned int prefixlen;
- start = 0;
- /* ":ServerInstance->Config->ServerName NOTICE user->nick :" */
- if (!useruid.empty())
- {
- User* user = ServerInstance->FindNick(useruid);
- if (user)
- {
- prefixlen = strlen(this->ServerName) + user->nick.length() + 11;
- user->WriteServ("NOTICE %s :There were errors in the configuration file:",user->nick.c_str());
- while (start < errors.length())
- {
- user->WriteServ("NOTICE %s :%s",user->nick.c_str(), errors.substr(start, 510 - prefixlen).c_str());
- start += 510 - prefixlen;
- }
- }
- }
- else
- {
- ServerInstance->SNO->WriteToSnoMask('A', "There were errors in the configuration file:");
- while (start < errors.length())
- {
- ServerInstance->SNO->WriteToSnoMask('A', errors.substr(start, 360));
- start += 360;
- }
- }
- return;
- }
-}
-
-void ServerConfig::Read(bool bail, const std::string &useruid)
-{
- int rem = 0, add = 0; /* Number of modules added, number of modules removed */
-