From c9108ea07312cbd49c52dd0b930f76bbaeea8308 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sun, 20 Mar 2016 06:00:20 -0500 Subject: [PATCH] ircd: modules: findmodule_byname(): also check LT_MODULE_EXT here --- ircd/modules.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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; }