findmodule_byname(const char *name)
{
int i;
+ char name_ext[PATH_MAX + 1];
+
+ rb_strlcpy(name_ext, name, sizeof basename_ext);
+ rb_strlcat(name_ext, LT_MODULE_EXT, sizeof basename_ext);
for (i = 0; i < num_mods; i++)
{
if(!irccmp(modlist[i]->name, name))
return i;
+
+ if(!irccmp(modlist[i]->name, name_ext))
+ return i;
}
+
return -1;
}
for (i = 0; core_module_table[i]; i++)
{
- snprintf(module_name, sizeof(module_name), "%s/%s", MODPATH,
- core_module_table[i]);
+ snprintf(module_name, sizeof(module_name), "%s/%s%s", MODPATH,
+ core_module_table[i], LT_MODULE_EXT);
if(load_a_module(module_name, warn, MAPI_ORIGIN_CORE, 1) == -1)
{
char modpath[PATH_MAX];
rb_dlink_node *pathst;
const char *mpath;
-
struct stat statbuf;
if (server_state_foreground)
{
mpath = pathst->data;
- snprintf(modpath, sizeof(modpath), "%s/%s", mpath, path);
+ snprintf(modpath, sizeof(modpath), "%s/%s%s", mpath, path, LT_MODULE_EXT);
if((strstr(modpath, "../") == NULL) && (strstr(modpath, "/..") == NULL))
{
if(stat(modpath, &statbuf) == 0)
}
sendto_realops_snomask(SNO_GENERAL, L_ALL,
- "Module %s [version: %s; MAPI version: %d; origin: %s; description: \"%s\"] loaded at 0x%lx",
+ "Module %s [version: %s; MAPI version: %d; origin: %s; description: \"%s\"] loaded at %p",
mod_basename, ver, MAPI_VERSION(*mapi_version), o, description,
- (unsigned long) tmpptr);
- ilog(L_MAIN, "Module %s [version: %s; MAPI version: %d; origin: %s; description: \"%s\"] loaded at 0x%lx",
- mod_basename, ver, MAPI_VERSION(*mapi_version), o, description, (unsigned long) tmpptr);
+ (void *) tmpptr);
+ ilog(L_MAIN, "Module %s [version: %s; MAPI version: %d; origin: %s; description: \"%s\"] loaded at %p",
+ mod_basename, ver, MAPI_VERSION(*mapi_version), o, description, (void *) tmpptr);
}
rb_free(mod_basename);
return 0;