std::ostringstream errstr; /* String stream containing the error output */
/* These tags MUST occur and must ONLY occur once in the config file */
- static char* Once[] = { "server", "admin", "files", "power", "options", "pid", NULL };
+ static char* Once[] = { "server", "admin", "files", "power", "options", NULL };
/* These tags can occur ONCE or not at all */
static InitialConfig Values[] = {
{"files", "motd", &this->motd, DT_CHARPTR, ValidateMotd},
{"files", "rules", &this->rules, DT_CHARPTR, ValidateRules},
{"power", "diepass", &this->diepass, DT_CHARPTR, NoValidation},
- {"power", "pauseval", &this->DieDelay, DT_INTEGER, NoValidation},
+ {"power", "pause", &this->DieDelay, DT_INTEGER, NoValidation},
{"power", "restartpass", &this->restartpass, DT_CHARPTR, NoValidation},
{"options", "prefixquit", &this->PrefixQuit, DT_CHARPTR, NoValidation},
{"die", "value", &this->DieValue, DT_CHARPTR, NoValidation},
*/
if (!bail)
{
- ServerInstance->stats->BoundPortCount = ServerInstance->BindPorts(false);
+ int found_ports;
+ ServerInstance->stats->BoundPortCount = ServerInstance->BindPorts(false, found_ports);
if (!removed_modules.empty())
for (std::vector<std::string>::iterator removing = removed_modules.begin(); removing != removed_modules.end(); removing++)
char linebuf[MAXBUF];
F.clear();
- file = fopen(fname, "r");
+
+ if (*fname != '/')
+ {
+ std::string::size_type pos;
+ std::string confpath = CONFIG_FILE;
+ if((pos = confpath.find("/inspircd.conf")) != std::string::npos)
+ {
+ /* Leaves us with just the path */
+ std::string newfile = confpath.substr(0, pos) + std::string("/") + fname;
+ file = fopen(newfile.c_str(), "r");
+
+ }
+ }
+ else
+ file = fopen(fname, "r");
if (file)
{