diff options
-rw-r--r-- | plugins/python/python.c | 8 | ||||
-rw-r--r-- | plugins/sysinfo/sysinfo.cpp | 3 | ||||
-rw-r--r-- | src/common/cfgfiles.c | 10 |
3 files changed, 16 insertions, 5 deletions
diff --git a/plugins/python/python.c b/plugins/python/python.c index 4ea34c23..0fed65ca 100644 --- a/plugins/python/python.c +++ b/plugins/python/python.c @@ -88,8 +88,10 @@ #undef PyUnicode_Check #undef PyUnicode_FromString +#undef PyUnicode_FromFormat #define PyUnicode_Check PyString_Check #define PyUnicode_AsFormat PyString_AsFormat +#define PyUnicode_FromFormat PyString_FromFormat #define PyUnicode_FromString PyString_FromString #define PyUnicode_AsUTF8 PyString_AsString @@ -1502,7 +1504,10 @@ Module_hexchat_get_info(PyObject *self, PyObject *args) Py_INCREF(Py_None); return Py_None; } - return PyUnicode_FromString(info); + if (strcmp (name, "gtkwin_ptr") == 0) + return PyUnicode_FromFormat("%p", info); /* format as pointer */ + else + return PyUnicode_FromString(info); } static PyObject * @@ -2157,6 +2162,7 @@ IInterp_Exec(char *command) memcpy(buffer, command, len); buffer[len] = '\n'; buffer[len+1] = 0; + PyRun_SimpleString("import hexchat"); o = PyRun_StringFlags(buffer, Py_single_input, d, d, NULL); g_free(buffer); if (o == NULL) { diff --git a/plugins/sysinfo/sysinfo.cpp b/plugins/sysinfo/sysinfo.cpp index 4c307957..7412d0d2 100644 --- a/plugins/sysinfo/sysinfo.cpp +++ b/plugins/sysinfo/sysinfo.cpp @@ -31,6 +31,7 @@ static hexchat_plugin *ph; /* plugin handle */ static char name[] = "SysInfo"; static char desc[] = "Display info about your hardware and OS"; static char version[] = "1.1"; +static char helptext[] = "USAGE: /sysinfo - Sends info about your hardware and OS to current channel."; static int firstRun; static char *wmiOs; static char *wmiCpu; @@ -397,7 +398,7 @@ hexchat_plugin_init (hexchat_plugin *plugin_handle, char **plugin_name, char **p firstRun = 1; - hexchat_hook_command (ph, "SYSINFO", HEXCHAT_PRI_NORM, printInfo, NULL, NULL); + hexchat_hook_command (ph, "SYSINFO", HEXCHAT_PRI_NORM, printInfo, helptext, NULL); hexchat_command (ph, "MENU -ishare\\system.png ADD \"Window/Display System Info\" \"SYSINFO\""); hexchat_printf (ph, "%s plugin loaded\n", name); diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c index 76ed564f..a7949d3f 100644 --- a/src/common/cfgfiles.c +++ b/src/common/cfgfiles.c @@ -752,15 +752,19 @@ load_config (void) snprintf (prefs.hex_dcc_dir, sizeof (prefs.hex_dcc_dir), "%s\\Downloads", out); } #else - if (g_get_user_special_dir(G_USER_DIRECTORY_DOWNLOAD)) - strcpy (prefs.hex_dcc_dir, g_get_user_special_dir(G_USER_DIRECTORY_DOWNLOAD)); + if (g_get_user_special_dir (G_USER_DIRECTORY_DOWNLOAD)) + { + strcpy (prefs.hex_dcc_dir, g_get_user_special_dir (G_USER_DIRECTORY_DOWNLOAD)); + } else + { strcpy (prefs.hex_dcc_dir, g_build_filename (g_get_home_dir (), "Downloads", NULL)); + } #endif strcpy (prefs.hex_dnsprogram, "host"); strcpy (prefs.hex_gui_ulist_doubleclick, "QUERY %s"); strcpy (prefs.hex_input_command_char, "/"); - strcpy (prefs.hex_irc_logmask, "%n-%c.log"); + strcpy (prefs.hex_irc_logmask, g_build_filename ("%n", "%c.log", NULL)); strcpy (prefs.hex_irc_nick1, username); strcpy (prefs.hex_irc_nick2, username); strcat (prefs.hex_irc_nick2, "_"); |