Mercurial > ~mikael > mcabber > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
1675:c73b31124fa6 | 1676:96b5484423af |
---|---|
25 #include <sys/stat.h> | 25 #include <sys/stat.h> |
26 #include <unistd.h> | 26 #include <unistd.h> |
27 #include <errno.h> | 27 #include <errno.h> |
28 #include <glob.h> | 28 #include <glob.h> |
29 | 29 |
30 #include "config.h" | |
30 #include "commands.h" | 31 #include "commands.h" |
31 #include "help.h" | 32 #include "help.h" |
32 #include "roster.h" | 33 #include "roster.h" |
33 #include "screen.h" | 34 #include "screen.h" |
34 #include "compl.h" | 35 #include "compl.h" |
2993 if (lmod) { | 2994 if (lmod) { |
2994 scr_LogPrint(LPRINT_LOGNORM, "Module %s is already loaded.", arg); | 2995 scr_LogPrint(LPRINT_LOGNORM, "Module %s is already loaded.", arg); |
2995 return; | 2996 return; |
2996 } | 2997 } |
2997 mdir = expand_filename(settings_opt_get("modules_dir")); | 2998 mdir = expand_filename(settings_opt_get("modules_dir")); |
2998 path = g_module_build_path(mdir, arg); | 2999 path = g_module_build_path(mdir ? mdir : PKGLIB_DIR, arg); |
2999 mod = g_module_open(path, G_MODULE_BIND_LAZY); | 3000 mod = g_module_open(path, G_MODULE_BIND_LAZY); |
3000 if (!mod) | 3001 if (!mod) |
3001 scr_LogPrint(LPRINT_LOGNORM, "Module loading failed: %s", | 3002 scr_LogPrint(LPRINT_LOGNORM, "Module loading failed: %s", |
3002 g_module_error()); | 3003 g_module_error()); |
3003 else { | 3004 else { |