summary refs log tree commit diff stats
path: root/plugins/tcl
diff options
context:
space:
mode:
authorBerke Viktor <bviktor@hexchat.org>2012-11-04 23:55:36 +0100
committerBerke Viktor <bviktor@hexchat.org>2012-11-04 23:55:36 +0100
commitdb218817fdc895aa2e3e52a71aa2f4423a534423 (patch)
tree42adbac9f667aa7a1dba5386150738fac84aeafc /plugins/tcl
parentad16ed3933b2904f3e4b206a67c4b67cc86622bc (diff)
Use configdir instead of *xchatdir*
Diffstat (limited to 'plugins/tcl')
-rw-r--r--plugins/tcl/tclplugin.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/plugins/tcl/tclplugin.c b/plugins/tcl/tclplugin.c
index 6ec89137..b03e7bac 100644
--- a/plugins/tcl/tclplugin.c
+++ b/plugins/tcl/tclplugin.c
@@ -93,7 +93,7 @@ static char unknown[] = {
 /* don't pollute the filesystem with script files, this only causes misuse of the folders
  * only use ~/.config/hexchat/addons/ and %APPDATA%\HexChat\addons */
 static char sourcedirs[] = {
-    "set files [lsort [glob -nocomplain -directory [hexchatdir] \"/addons/*.tcl\"]]\n"
+    "set files [lsort [glob -nocomplain -directory [configdir] \"/addons/*.tcl\"]]\n"
         "set init [lsearch -glob $files \"*/init.tcl\"]\n"
         "if { $init > 0 } {\n"
         "set initfile [lindex $files $init]\n"
@@ -122,8 +122,7 @@ static char inlinetcl[] = {
 "proc ::server { args } { return [eval [join [list getinfo $args server]]] }\n"
 "proc ::version { args } { return [eval [join [list getinfo $args version]]] }\n"
 "proc ::win_status { args } { return [eval [join [list getinfo $args win_status]]] }\n"
-"proc ::hexchatdir { args } { return [eval [join [list getinfo $args hexchatdir]]] }\n"
-"proc ::hexchatdirfs { args } { return [eval [join [list getinfo $args hexchatdirfs]]] }\n"
+"proc ::configdir { args } { return [eval [join [list getinfo $args configdir]]] }\n"
 
 "proc ::color { {arg {}} } { return \"\\003$arg\" }\n"
 "proc ::bold { } { return \"\\002\" }\n"
@@ -2031,7 +2030,7 @@ static int Command_Source(char *word[], char *word_eol[], void *userdata)
 
     if (len > 4 && strcasecmp(".tcl", word[2] + len - 4) == 0) {
 
-        hexchatdir = hexchat_get_info(ph, "hexchatdir");
+        hexchatdir = hexchat_get_info(ph, "configdir");
 
         Tcl_DStringInit(&ds);
 
@@ -2137,7 +2136,7 @@ static void Tcl_Plugin_Init()
     for (x = 0; x < XC_SIZE; x++)
         xc[x].hook = NULL;
 
-    hexchatdir = hexchat_get_info(ph, "hexchatdir");
+    hexchatdir = hexchat_get_info(ph, "configdir");
 
     if (Tcl_Eval(interp, unknown) == TCL_ERROR) {
         hexchat_printf(ph, "Error sourcing internal 'unknown' (%s)\n", Tcl_GetStringResult(interp));