diff options
author | Berke Viktor <bviktor@hexchat.org> | 2012-07-13 20:03:27 +0200 |
---|---|---|
committer | Berke Viktor <bviktor@hexchat.org> | 2012-07-13 20:03:27 +0200 |
commit | 6fd3a18fcfd874ba90c7cb5fdad43e5c0e94a204 (patch) | |
tree | 0885147afc5e0132775dd1928e9db3edb7cc8670 /plugins | |
parent | 9a5c8c2f3c40d4802b91dbe6e10a87bab2e1c4ee (diff) |
Update to XChat r1510
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/python/python.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/python/python.c b/plugins/python/python.c index e887ef8f..d1cdb1c8 100644 --- a/plugins/python/python.c +++ b/plugins/python/python.c @@ -385,11 +385,21 @@ Util_Autoload_from (const char *dir_name) static void Util_Autoload() { + const char *xdir; + char *sub_dir; /* we need local filesystem encoding for chdir, opendir etc */ /* auto-load from ~/.xchat2/ or %APPDATA%\X-Chat 2\ */ + xdir = xchat_get_info(ph, "xchatdirfs"); Util_Autoload_from(xchat_get_info(ph, "xchatdirfs")); + /* auto-load from subdirectory plugins */ + sub_dir = malloc (strlen (xdir) + 9); + strcpy (sub_dir, xdir); + strcat (sub_dir, "/plugins"); + Util_Autoload_from(sub_dir); + free (sub_dir); + #ifdef WIN32 /* also auto-load C:\Program Files\XChat\Plugins\*.py */ Util_Autoload_from(HEXCHATLIBDIR"/plugins"); #endif |