summary refs log tree commit diff stats
path: root/plugins/python
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/python
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/python')
-rw-r--r--plugins/python/python.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/python/python.c b/plugins/python/python.c
index 477cbc74..38b98c4a 100644
--- a/plugins/python/python.c
+++ b/plugins/python/python.c
@@ -392,16 +392,16 @@ Util_Autoload()
 	xdir = xchat_get_info(ph, "xchatdirfs");
 
 	/* don't pollute the filesystem with script files, this only causes misuse of the folders
-	 * only use ~/.config/hexchat/scripts/ and %APPDATA%\HexChat\scripts */
+	 * only use ~/.config/hexchat/addons/ and %APPDATA%\HexChat\addons */
 #if 0
 	/* auto-load from ~/.config/hexchat/ or %APPDATA%\HexChat\ */
 	Util_Autoload_from(xchat_get_info(ph, "xchatdirfs"));
 #endif
 
-	/* auto-load from subdirectory scripts */
-	sub_dir = malloc (strlen (xdir) + 9);
+	/* auto-load from subdirectory addons */
+	sub_dir = malloc (strlen (xdir) + 8);
 	strcpy (sub_dir, xdir);
-	strcat (sub_dir, "/scripts");
+	strcat (sub_dir, "/addons");
 	Util_Autoload_from(sub_dir);
 	free (sub_dir);
 
@@ -444,9 +444,9 @@ Util_Expand(char *filename)
 		return expanded;
 	g_free(expanded);
 
-	/* Check if ~/.config/hexchat/scripts/<filename> exists. */
+	/* Check if ~/.config/hexchat/addons/<filename> exists. */
 	expanded = g_build_filename(xchat_get_info(ph, "xchatdir"),
-				    "scripts", filename, NULL);
+				    "addons", filename, NULL);
 	if (g_file_test(expanded, G_FILE_TEST_EXISTS))
 		return expanded;
 	g_free(expanded);