ircd: modules: findmodule_byname(): also check LT_MODULE_EXT here
This commit is contained in:
parent
6cb643f4f9
commit
c9108ea073
1 changed files with 8 additions and 0 deletions
|
@ -206,12 +206,20 @@ int
|
||||||
findmodule_byname(const char *name)
|
findmodule_byname(const char *name)
|
||||||
{
|
{
|
||||||
int i;
|
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++)
|
for (i = 0; i < num_mods; i++)
|
||||||
{
|
{
|
||||||
if(!irccmp(modlist[i]->name, name))
|
if(!irccmp(modlist[i]->name, name))
|
||||||
return i;
|
return i;
|
||||||
|
|
||||||
|
if(!irccmp(modlist[i]->name, name_ext))
|
||||||
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue