diff mcabber/mcabber/commands.c @ 1676:96b5484423af

Use $prefix/lib/mcabber as default modules_dir
author Myhailo Danylenko <isbear@ukrpost.net>
date Sat, 16 Jan 2010 12:12:45 +0200
parents c73b31124fa6
children 1d84f5be2ad1
line wrap: on
line diff
--- a/mcabber/mcabber/commands.c	Mon Jan 18 16:36:55 2010 +0200
+++ b/mcabber/mcabber/commands.c	Sat Jan 16 12:12:45 2010 +0200
@@ -27,6 +27,7 @@
 #include <errno.h>
 #include <glob.h>
 
+#include "config.h"
 #include "commands.h"
 #include "help.h"
 #include "roster.h"
@@ -2995,7 +2996,7 @@
     return;
   }
   mdir = expand_filename(settings_opt_get("modules_dir"));
-  path = g_module_build_path(mdir, arg);
+  path = g_module_build_path(mdir ? mdir : PKGLIB_DIR, arg);
   mod  = g_module_open(path, G_MODULE_BIND_LAZY);
   if (!mod)
     scr_LogPrint(LPRINT_LOGNORM, "Module loading failed: %s",