diff options
Diffstat (limited to 'plugins/tcl/tclplugin.c')
-rw-r--r-- | plugins/tcl/tclplugin.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/tcl/tclplugin.c b/plugins/tcl/tclplugin.c index 30a0a1b5..168e0f54 100644 --- a/plugins/tcl/tclplugin.c +++ b/plugins/tcl/tclplugin.c @@ -89,8 +89,10 @@ static char unknown[] = { "}\n" }; +/* don't pollute the filesystem with script files, this only causes misuse of the folders + * only use ~/.config/hexchat/scripts/ and %APPDATA%\HexChat\scripts */ static char sourcedirs[] = { - "set files [lsort [glob -nocomplain -directory [xchatdir] \"*.tcl\"]]\n" + "set files [lsort [glob -nocomplain -directory [xchatdir] \"/scripts/*.tcl\"]]\n" "set init [lsearch -glob $files \"*/init.tcl\"]\n" "if { $init > 0 } {\n" "set initfile [lindex $files $init]\n" @@ -2037,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, "/", 1); + Tcl_DStringAppend(&ds, "/scripts/", 9); Tcl_DStringAppend(&ds, word_eol[2], strlen(word_eol[2])); } } |