* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ * InspIRCd: (C) 2002-2008 InspIRCd Development Team
* See: http://www.inspircd.org/wiki/index.php/Credits
*
* This program is free but copyrighted software; see
bool ValidateSID(ServerConfig* conf, const char*, const char*, ValueItem &data)
{
-// std::string sid = data.GetString();
+ const char *sid = data.GetString();
+
+ if (*sid && !conf->GetInstance()->IsSID(sid))
+ {
+ throw CoreException(std::string(sid) + " is not a valid server ID. A server ID must be 3 characters long, with the first character a digit and the next two characters a digit or letter.");
+ }
+
return true;
}
}
else
{
- ServerInstance->WriteOpers("There were errors in the configuration file:");
+ ServerInstance->SNO->WriteToSnoMask('O', "There were errors in the configuration file:");
while (start < errors.length())
{
- ServerInstance->WriteOpers(errors.substr(start, 360).c_str());
+ ServerInstance->SNO->WriteToSnoMask('O', errors.substr(start, 360).c_str());
start += 360;
}
}
{
if (ServerInstance->Modules->Unload(removing->c_str()))
{
- ServerInstance->WriteOpers("*** REHASH UNLOADED MODULE: %s",removing->c_str());
+ ServerInstance->SNO->WriteToSnoMask('O', "REHASH UNLOADED MODULE: %s",removing->c_str());
if (user)
user->WriteServ("973 %s %s :Module %s successfully unloaded.",user->nick, removing->c_str(), removing->c_str());
rem++;
if (ServerInstance->Modules->Load(adding->c_str()))
{
- ServerInstance->WriteOpers("*** REHASH LOADED MODULE: %s",adding->c_str());
+ ServerInstance->SNO->WriteToSnoMask('O', "REHASH LOADED MODULE: %s",adding->c_str());
if (user)
user->WriteServ("975 %s %s :Module %s successfully loaded.",user->nick, adding->c_str(), adding->c_str());
if (user)
user->WriteServ("NOTICE %s :*** Successfully rehashed server.", user->nick);
else
- ServerInstance->WriteOpers("*** Successfully rehashed server.");
+ ServerInstance->SNO->WriteToSnoMask('O', "Successfully rehashed server.");
}
/* XXX: This can and will block! */