0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-10-02 13:48:53 +02:00

ircd: modules: use LT_MODULE_EXT more consistently

This commit is contained in:
William Pitcock 2016-03-20 05:54:48 -05:00
parent 032ef5ef9e
commit 6cb643f4f9

View file

@ -274,8 +274,8 @@ load_core_modules(int warn)
for (i = 0; core_module_table[i]; i++)
{
snprintf(module_name, sizeof(module_name), "%s/%s", MODPATH,
core_module_table[i]);
snprintf(module_name, sizeof(module_name), "%s/%s%s", MODPATH,
core_module_table[i], LT_MODULE_EXT);
if(load_a_module(module_name, warn, MAPI_ORIGIN_CORE, 1) == -1)
{
@ -299,7 +299,6 @@ load_one_module(const char *path, int origin, int coremodule)
char modpath[PATH_MAX];
rb_dlink_node *pathst;
const char *mpath;
struct stat statbuf;
if (server_state_foreground)
@ -315,7 +314,7 @@ load_one_module(const char *path, int origin, int coremodule)
{
mpath = pathst->data;
snprintf(modpath, sizeof(modpath), "%s/%s", mpath, path);
snprintf(modpath, sizeof(modpath), "%s/%s%s", mpath, path, LT_MODULE_EXT);
if((strstr(modpath, "../") == NULL) && (strstr(modpath, "/..") == NULL))
{
if(stat(modpath, &statbuf) == 0)