summary refs log tree commit diff stats
path: root/plugins/tcl/tclplugin.c
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/tcl/tclplugin.c
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/tcl/tclplugin.c')
-rw-r--r--plugins/tcl/tclplugin.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/tcl/tclplugin.c b/plugins/tcl/tclplugin.c
index 168e0f54..1c434d40 100644
--- a/plugins/tcl/tclplugin.c
+++ b/plugins/tcl/tclplugin.c
@@ -90,9 +90,9 @@ static char unknown[] = {
 };
 
 /* 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 */
 static char sourcedirs[] = {
-    "set files [lsort [glob -nocomplain -directory [xchatdir] \"/scripts/*.tcl\"]]\n"
+    "set files [lsort [glob -nocomplain -directory [xchatdir] \"/addons/*.tcl\"]]\n"
         "set init [lsearch -glob $files \"*/init.tcl\"]\n"
         "if { $init > 0 } {\n"
         "set initfile [lindex $files $init]\n"
@@ -2039,7 +2039,7 @@ static int Command_Source(char *word[], char *word_eol[], void *userdata)
         } else {
             if (!strchr(word_eol[2], '/')) {
                 Tcl_DStringAppend(&ds, xchatdir, strlen(xchatdir));
-                Tcl_DStringAppend(&ds, "/scripts/", 9);
+                Tcl_DStringAppend(&ds, "/addons/", 8);
                 Tcl_DStringAppend(&ds, word_eol[2], strlen(word_eol[2]));
             }
         }