*CustomVersion = *motd = *rules = *PrefixQuit = *DieValue = *DNSServer = '\0';
*OperOnlyStats = *ModPath = *MyExecutable = *DisabledCommands = *PID = '\0';
log_file = NULL;
- forcedebug = OperSpyWhois = nofork = HideBans = HideSplits = false;
+ NoUserDns = forcedebug = OperSpyWhois = nofork = HideBans = HideSplits = false;
writelog = AllowHalfop = true;
dns_timeout = DieDelay = 5;
MaxTargets = 20;
return true;
}
+bool InitializeDisabledCommands(const char* data, InspIRCd* ServerInstance)
+{
+ std::stringstream dcmds(data);
+ std::string thiscmd;
+
+ /* Enable everything first */
+ for (nspace::hash_map<std::string,command_t*>::iterator x = ServerInstance->Parser->cmdlist.begin(); x != ServerInstance->Parser->cmdlist.end(); x++)
+ x->second->Disable(false);
+
+ /* Now disable all the ones which the user wants disabled */
+ while (dcmds >> thiscmd)
+ {
+ nspace::hash_map<std::string,command_t*>::iterator cm = ServerInstance->Parser->cmdlist.find(thiscmd);
+ if (cm != ServerInstance->Parser->cmdlist.end())
+ {
+ log(DEBUG,"Disabling command '%s'",cm->second->command.c_str());
+ cm->second->Disable(true);
+ }
+ }
+ return true;
+}
+
bool ValidateDnsServer(const char* tag, const char* value, void* data)
{
char* x = (char*)data;
{"options", "hidewhois", &this->HideWhoisServer, DT_CHARPTR, NoValidation},
{"options", "operspywhois", &this->OperSpyWhois, DT_BOOLEAN, NoValidation},
{"options", "tempdir", &this->TempDir, DT_CHARPTR, ValidateTempDir},
+ {"options", "nouserdns", &this->NoUserDns, DT_BOOLEAN, NoValidation},
{"pid", "file", &this->PID, DT_CHARPTR, NoValidation},
{NULL}
};