Clean up module loading a bit.
This commit is contained in:
parent
c90e5c0884
commit
6603175304
1 changed files with 5 additions and 4 deletions
|
@ -253,12 +253,13 @@ load_all_modules(int warn)
|
||||||
|
|
||||||
while ((ldirent = readdir(system_module_dir)) != NULL)
|
while ((ldirent = readdir(system_module_dir)) != NULL)
|
||||||
{
|
{
|
||||||
size_t len;
|
size_t len = strlen(ldirent->d_name);
|
||||||
|
|
||||||
len = strlen(ldirent->d_name);
|
if(len > module_ext_len &&
|
||||||
if(len > module_ext_len && !strcasecmp(ldirent->d_name + (len - module_ext_len), LT_MODULE_EXT))
|
strncasecmp(ldirent->d_name + (len - module_ext_len), LT_MODULE_EXT, module_ext_len) == 0)
|
||||||
{
|
{
|
||||||
(void) snprintf(module_fq_name, sizeof(module_fq_name), "%s%c%s", ircd_paths[IRCD_PATH_AUTOLOAD_MODULES], RB_PATH_SEPARATOR, ldirent->d_name);
|
(void) snprintf(module_fq_name, sizeof(module_fq_name), "%s%c%s",
|
||||||
|
ircd_paths[IRCD_PATH_AUTOLOAD_MODULES], RB_PATH_SEPARATOR, ldirent->d_name);
|
||||||
(void) load_a_module(module_fq_name, warn, MAPI_ORIGIN_CORE, 0);
|
(void) load_a_module(module_fq_name, warn, MAPI_ORIGIN_CORE, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue