try
{
ircd_module* a = new ircd_module(modfile);
- log(DEBUG,"ircd_module constructor success, MODCOUNT %d",MODCOUNT);
factory[MODCOUNT+1] = a;
if (factory[MODCOUNT+1]->LastError())
{
snprintf(MODERR,MAXBUF,"Loader/Linker error: %s",factory[MODCOUNT+1]->LastError());
return false;
}
- log(DEBUG,"No last error");
if ((int)factory[MODCOUNT+1]->factory != -1)
{
- log(DEBUG,"Factory ptr: %0x",&factory[MODCOUNT+1]->factory);
Module* m = factory[MODCOUNT+1]->factory->CreateModule(MyServer);
modules[MODCOUNT+1] = m;
/* save the module and the module's classfactory, if
this->BuildISupport();
printf("\nInspIRCd is now running!\n");
-
+
+ if (!stats->BoundPortCount)
+ {
+ printf("\nI couldn't bind any ports! Are you sure you didn't start InspIRCd twice?\n");
+ Exit(ERROR);
+ }
+
if (!Config->nofork)
{
fclose(stdout);
/* Add the listening sockets used for client inbound connections
* to the socket engine
*/
+ log(DEBUG,"%d listeners",stats->BoundPortCount);
for (unsigned long count = 0; count < stats->BoundPortCount; count++)
+ {
+ log(DEBUG,"Add listener: %d",Config->openSockfd[count]);
SE->AddFd(Config->openSockfd[count],true,X_LISTEN);
+ }
this->WritePID(Config->PID);