- err = "This doesn't look like a module file to me...";
- return;
- }
-#ifdef STATIC_LINK
- this->staticname[0] = '\0';
- ServerInstance->Log(DEBUG,"Loading core-compiled module '%s'",fname);
- for (int j = 0; modsyms[j].name; j++)
- {
- ServerInstance->Log(DEBUG,"Check %s",modsyms[j].name);
- if (!strcmp(modsyms[j].name,fname))
- {
- ServerInstance->Log(DEBUG,"Found %s",fname);
- strlcpy(this->staticname,fname,1020);
- err = 0;
- return;
- }
- }
- err = "Module is not statically compiled into the ircd";
-#else
- h = dlopen(fname, RTLD_NOW|RTLD_LOCAL);
- if (!h)
- {
- err = (char*)dlerror();
- ServerInstance->Log(DEBUG,"dlerror '%s' occured!", err);