ircd: modules: findmodule_byname(): also check LT_MODULE_EXT here

This commit is contained in:
William Pitcock 2016-03-20 06:00:20 -05:00
parent 6cb643f4f9
commit c9108ea073

View file

@ -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;
}