summary refs log tree commit diff stats
path: root/plugins/lua
diff options
context:
space:
mode:
authorBerke Viktor <bviktor@hexchat.org>2012-07-26 20:53:59 +0200
committerBerke Viktor <bviktor@hexchat.org>2012-07-26 20:53:59 +0200
commitec301a5a5486898cb4d9854a56eb866f1b93f634 (patch)
treec0cec2f567df7e1f62fc0168b2fe3cc68c9d8954 /plugins/lua
parent7f831646bb8c31966e0f3ff77d40ce66711daa99 (diff)
Auto-load user plugins and scripts from <config>/addons
On Unix leave $(libdir)/hexchat/plugins for plugin packagers, on Windows
prevent users from modifying Program Files by ignoring everything except
bundled plugins
Diffstat (limited to 'plugins/lua')
-rw-r--r--plugins/lua/lua.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/lua/lua.c b/plugins/lua/lua.c
index a70ad0d6..8fc55a26 100644
--- a/plugins/lua/lua.c
+++ b/plugins/lua/lua.c
@@ -525,7 +525,7 @@ static int lxc_cb_load(char *word[], char *word_eol[], void *userdata)
 			else
 			{
 				xdir = xchat_get_info (ph, "xchatdirfs");
-				snprintf (file, PATH_MAX, "%s/scripts/%s", xdir, word[2]);
+				snprintf (file, PATH_MAX, "%s/addons/%s", xdir, word[2]);
 			}
 		}
 
@@ -679,7 +679,7 @@ int xchat_plugin_init(xchat_plugin *plugin_handle,
 	xchat_hook_command(ph, "LUA", XCHAT_PRI_NORM, lxc_cb_lua, "Usage: LUA <code>, executes <code> in a new lua state", NULL);
 
 	xdir = xchat_get_info (ph, "xchatdirfs");
-	xsubdir = g_build_filename (xdir, "scripts", NULL);
+	xsubdir = g_build_filename (xdir, "addons", NULL);
 	lxc_autoload_from_path (xsubdir);
 	g_free (xsubdir);