MaxConn = SOMAXCONN;
MaxWhoResults = 100;
debugging = 0;
+ MaxChans = 20;
+ OperMaxChans = 30;
LogLevel = DEFAULT;
maxbans.clear();
}
{"options", "syntaxhints", "0", new ValueContainerBool (&this->SyntaxHints), DT_BOOLEAN, NoValidation},
{"options", "cyclehosts", "0", new ValueContainerBool (&this->CycleHosts), DT_BOOLEAN, NoValidation},
{"options", "ircumsgprefix","0", new ValueContainerBool (&this->UndernetMsgPrefix), DT_BOOLEAN, NoValidation},
+ {"options", "announceinvites", "1", new ValueContainerBool (&this->AnnounceInvites), DT_BOOLEAN, NoValidation},
+ {"options", "hostintopic", "1", new ValueContainerBool (&this->FullHostInTopic), DT_BOOLEAN, NoValidation},
{"pid", "file", "", new ValueContainerChar (this->PID), DT_CHARPTR, NoValidation},
{"whowas", "groupsize", "10", new ValueContainerInt (&this->WhoWasGroupSize), DT_INTEGER, NoValidation},
{"whowas", "maxgroups", "10240", new ValueContainerInt (&this->WhoWasMaxGroups), DT_INTEGER, NoValidation},
{"whowas", "maxkeep", "3600", new ValueContainerChar (maxkeep), DT_CHARPTR, ValidateWhoWas},
{"die", "value", "", new ValueContainerChar (this->DieValue), DT_CHARPTR, NoValidation},
+ {"channels", "users", "20", new ValueContainerUInt (&this->MaxChans), DT_INTEGER, NoValidation},
+ {"channels", "opers", "60", new ValueContainerUInt (&this->OperMaxChans), DT_INTEGER, NoValidation},
{NULL}
};
bool ServerConfig::DirValid(const char* dirandfile)
{
- char work[MAXBUF];
- char buffer[MAXBUF];
- char otherdir[MAXBUF];
+ char work[1024];
+ char buffer[1024];
+ char otherdir[1024];
int p;
- strlcpy(work, dirandfile, MAXBUF);
+ strlcpy(work, dirandfile, 1024);
p = strlen(work);
// we just want the dir
}
// Get the current working directory
- if (getcwd(buffer, MAXBUF ) == NULL )
+ if (getcwd(buffer, 1024 ) == NULL )
return false;
if (chdir(work) == -1)
return false;
- if (getcwd(otherdir, MAXBUF ) == NULL )
+ if (getcwd(otherdir, 1024 ) == NULL )
return false;
if (chdir(buffer) == -1)
std::string ServerConfig::GetFullProgDir(char** argv, int argc)
{
- char work[MAXBUF];
- char buffer[MAXBUF];
- char otherdir[MAXBUF];
+ char work[1024];
+ char buffer[1024];
+ char otherdir[1024];
int p;
- strlcpy(work,argv[0],MAXBUF);
+ strlcpy(work,argv[0],1024);
p = strlen(work);
// we just want the dir
}
// Get the current working directory
- if (getcwd(buffer, MAXBUF) == NULL)
+ if (getcwd(buffer, 1024) == NULL)
return "";
if (chdir(work) == -1)
return "";
- if (getcwd(otherdir, MAXBUF) == NULL)
+ if (getcwd(otherdir, 1024) == NULL)
return "";
if (chdir(buffer) == -1)