/* Cleanup Server Names */
for(servernamelist::iterator itr = servernames.begin(); itr != servernames.end(); ++itr)
delete (*itr);
/* Cleanup Server Names */
for(servernamelist::iterator itr = servernames.begin(); itr != servernames.end(); ++itr)
delete (*itr);
{
/* Will raise a SIGABRT if not trapped */
throw CoreException(std::string("Failed to execv()! error: ") + strerror(errno));
{
/* Will raise a SIGABRT if not trapped */
throw CoreException(std::string("Failed to execv()! error: ") + strerror(errno));
void InspIRCd::WritePID(const std::string &filename)
{
std::string fname = (filename.empty() ? "inspircd.pid" : filename);
void InspIRCd::WritePID(const std::string &filename)
{
std::string fname = (filename.empty() ? "inspircd.pid" : filename);
- if (*(fname.begin()) != '/')
+ std::replace(fname.begin(), fname.end(), '\\', '/');
+ if ((fname[0] != '/') && (!Config->StartsWithWindowsDriveLetter(filename)))
- /* Functor initialisation. Note that the ordering here is very important. */
+ /* Functor initialisation. Note that the ordering here is very important.
+ *
+ * THIS MUST MATCH ORDER OF DECLARATION OF THE HandleWhateverFunc classes
+ * within class InspIRCd.
+ */
HandleProcessUser(this),
HandleIsNick(this),
HandleIsIdent(this),
HandleFindDescriptor(this),
HandleFloodQuitUser(this),
HandleProcessUser(this),
HandleIsNick(this),
HandleIsIdent(this),
HandleFindDescriptor(this),
HandleFloodQuitUser(this),
-
- /* Functor pointer initialisation. Must match the order of the list above */
+ HandleIsChannel(this),
+ HandleIsSID(this),
+ HandleRehash(this),
+
+ /* Functor pointer initialisation. Must match the order of the list above
+ *
+ * THIS MUST MATCH THE ORDER OF DECLARATION OF THE FUNCTORS, e.g. the methods
+ * themselves within the class.
+ */
IsNick(&HandleIsNick),
IsIdent(&HandleIsIdent),
FindDescriptor(&HandleFindDescriptor),
FloodQuitUser(&HandleFloodQuitUser)
{
IsNick(&HandleIsNick),
IsIdent(&HandleIsIdent),
FindDescriptor(&HandleFindDescriptor),
FloodQuitUser(&HandleFloodQuitUser)
{
int found_ports = 0;
FailedPortList pl;
int do_version = 0, do_nofork = 0, do_debug = 0,
do_nolog = 0, do_root = 0, do_testsuite = 0; /* flag variables */
char c = 0;
int found_ports = 0;
FailedPortList pl;
int do_version = 0, do_nofork = 0, do_debug = 0,
do_nolog = 0, do_root = 0, do_testsuite = 0; /* flag variables */
char c = 0;
memset(&server, 0, sizeof(server));
memset(&client, 0, sizeof(client));
memset(&server, 0, sizeof(server));
memset(&client, 0, sizeof(client));
this->Config = new ServerConfig(this);
this->SNO = new SnomaskManager(this);
this->BanCache = new BanCacheManager(this);
this->Config = new ServerConfig(this);
this->SNO = new SnomaskManager(this);
this->BanCache = new BanCacheManager(this);
Config->sid[0] = (char)(sid / 100 + 48);
Config->sid[1] = (char)(((sid / 10) % 10) + 48);
Config->sid[2] = (char)(sid % 10 + 48);
Config->sid[0] = (char)(sid / 100 + 48);
Config->sid[1] = (char)(((sid / 10) % 10) + 48);
Config->sid[2] = (char)(sid % 10 + 48);
{
printf("\nWARNING: Not all your client ports could be bound --\nstarting anyway with %d of %d client ports bound.\n\n", bounditems, found_ports);
printf("The following port(s) failed to bind:\n");
{
printf("\nWARNING: Not all your client ports could be bound --\nstarting anyway with %d of %d client ports bound.\n\n", bounditems, found_ports);
printf("The following port(s) failed to bind:\n");