diff --git a/ircd/modules.c b/ircd/modules.c index f1faf5d8..2e0e0869 100644 --- a/ircd/modules.c +++ b/ircd/modules.c @@ -206,12 +206,20 @@ int 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; }