summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--plugins/python/python.c20
-rw-r--r--plugins/sysinfo/sysinfo.cpp3
-rw-r--r--src/common/cfgfiles.c10
-rw-r--r--src/common/dbus/dbus-client.c1
-rw-r--r--src/common/hexchat.c4
-rw-r--r--src/fe-gtk/maingui.c2
-rw-r--r--src/fe-gtk/palette.c32
-rw-r--r--src/fe-gtk/rawlog.c25
-rw-r--r--src/fe-gtk/setup.c5
-rw-r--r--src/fe-gtk/userlistgui.c4
10 files changed, 63 insertions, 43 deletions
diff --git a/plugins/python/python.c b/plugins/python/python.c
index 0fed65ca..d5a2aba8 100644
--- a/plugins/python/python.c
+++ b/plugins/python/python.c
@@ -498,18 +498,20 @@ Callback_Command(char *word[], char *word_eol[], void *userdata)
 	PyObject *retobj;
 	PyObject *word_list, *word_eol_list;
 	int ret = 0;
+	PyObject *plugin;
 
-	BEGIN_PLUGIN(hook->plugin);
+	plugin = hook->plugin;
+	BEGIN_PLUGIN(plugin);
 
 	word_list = Util_BuildList(word+1);
 	if (word_list == NULL) {
-		END_PLUGIN(hook->plugin);
+		END_PLUGIN(plugin);
 		return 0;
 	}
 	word_eol_list = Util_BuildList(word_eol+1);
 	if (word_eol_list == NULL) {
 		Py_DECREF(word_list);
-		END_PLUGIN(hook->plugin);
+		END_PLUGIN(plugin);
 		return 0;
 	}
 
@@ -528,7 +530,7 @@ Callback_Command(char *word[], char *word_eol[], void *userdata)
 		PyErr_Print();
 	}
 
-	END_PLUGIN(hook->plugin);
+	END_PLUGIN(plugin);
 
 	return ret;
 }
@@ -548,6 +550,7 @@ Callback_Print(char *word[], void *userdata)
 	int next = 0;
 	int i;
 	int ret = 0;
+	PyObject *plugin;
 
 	/* Cut off the message identifier. */
 	word += 1;
@@ -579,13 +582,14 @@ Callback_Print(char *word[], void *userdata)
 	}
 	word_eol[i] = "";
 
-	BEGIN_PLUGIN(hook->plugin);
+	plugin = hook->plugin;
+	BEGIN_PLUGIN(plugin);
 
 	word_list = Util_BuildList(word);
 	if (word_list == NULL) {
 		g_free(word_eol_raw);
 		g_free(word_eol);
-		END_PLUGIN(hook->plugin);
+		END_PLUGIN(plugin);
 		return 0;
 	}
 	word_eol_list = Util_BuildList(word_eol);
@@ -593,7 +597,7 @@ Callback_Print(char *word[], void *userdata)
 		g_free(word_eol_raw);
 		g_free(word_eol);
 		Py_DECREF(word_list);
-		END_PLUGIN(hook->plugin);
+		END_PLUGIN(plugin);
 		return 0;
 	}
 
@@ -614,7 +618,7 @@ Callback_Print(char *word[], void *userdata)
 		PyErr_Print();
 	}
 
-	END_PLUGIN(hook->plugin);
+	END_PLUGIN(plugin);
 
 	return ret;
 }
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, "_");
diff --git a/src/common/dbus/dbus-client.c b/src/common/dbus/dbus-client.c
index cc2fd087..a30a75bd 100644
--- a/src/common/dbus/dbus-client.c
+++ b/src/common/dbus/dbus-client.c
@@ -19,6 +19,7 @@
  * xclaesse@gmail.com
  */
 
+#define GLIB_DISABLE_DEPRECATION_WARNINGS
 #include <dbus/dbus-glib.h>
 #include "dbus-client.h"
 #include "../hexchat.h"
diff --git a/src/common/hexchat.c b/src/common/hexchat.c
index cef391d2..72b97e3a 100644
--- a/src/common/hexchat.c
+++ b/src/common/hexchat.c
@@ -304,7 +304,7 @@ away_check (void)
 	GSList *list;
 	int full, sent, loop = 0;
 
-	if (!prefs.hex_away_track || prefs.hex_away_size_max < 1)
+	if (!prefs.hex_away_track)
 		return 1;
 
 doover:
@@ -319,7 +319,7 @@ doover:
 		if (sess->server->connected &&
 			 sess->type == SESS_CHANNEL &&
 			 sess->channel[0] &&
-			 sess->total <= prefs.hex_away_size_max)
+			 (sess->total <= prefs.hex_away_size_max || !prefs.hex_away_size_max))
 		{
 			if (!sess->done_away_check)
 			{
diff --git a/src/fe-gtk/maingui.c b/src/fe-gtk/maingui.c
index 0009198e..96f5e6b2 100644
--- a/src/fe-gtk/maingui.c
+++ b/src/fe-gtk/maingui.c
@@ -2611,7 +2611,7 @@ mg_create_center (session *sess, session_gui *gui, GtkWidget *box)
 	mg_create_textarea (sess, vbox);
 	mg_create_entry (sess, vbox);
 
-	g_idle_add ((GSourceFunc)mg_add_pane_signals, gui);
+	mg_add_pane_signals (gui);
 }
 
 static void
diff --git a/src/fe-gtk/palette.c b/src/fe-gtk/palette.c
index 7507cbf4..f40fd8b4 100644
--- a/src/fe-gtk/palette.c
+++ b/src/fe-gtk/palette.c
@@ -39,22 +39,22 @@
 
 GdkColor colors[] = {
 	/* colors for xtext */
-	{0, 0xd3d3, 0xd7d7, 0xcfcf}, /* 16 white */
-	{0, 0x2e2e, 0x3434, 0x3636}, /* 17 black */
-	{0, 0x3434, 0x6565, 0xa4a4}, /* 18 blue */
-	{0, 0x4e4e, 0x9a9a, 0x0606}, /* 19 green */
-	{0, 0xcccc, 0x0000, 0x0000}, /* 20 red */
-	{0, 0x8f8f, 0x3939, 0x0202}, /* 21 light red */
-	{0, 0x5c5c, 0x3535, 0x6666}, /* 22 purple */
-	{0, 0xcece, 0x5c5c, 0x0000}, /* 23 orange */
-	{0, 0xc4c4, 0xa0a0, 0x0000}, /* 24 yellow */
-	{0, 0x7373, 0xd2d2, 0x1616}, /* 25 green */
-	{0, 0x1111, 0xa8a8, 0x7979}, /* 26 aqua */
-	{0, 0x5858, 0xa1a1, 0x9d9d}, /* 27 light aqua */
-	{0, 0x5757, 0x7979, 0x9e9e}, /* 28 blue */
-	{0, 0xa0d0, 0x42d4, 0x6562}, /* 29 light purple */
-	{0, 0x5555, 0x5757, 0x5353}, /* 30 grey */
-	{0, 0x8888, 0x8a8a, 0x8585}, /* 31 light grey */
+	{0, 0xd3d3, 0xd7d7, 0xcfcf}, /* 0 white */
+	{0, 0x2e2e, 0x3434, 0x3636}, /* 1 black */
+	{0, 0x3434, 0x6565, 0xa4a4}, /* 2 blue */
+	{0, 0x4e4e, 0x9a9a, 0x0606}, /* 3 green */
+	{0, 0xcccc, 0x0000, 0x0000}, /* 4 red */
+	{0, 0x8f8f, 0x3939, 0x0202}, /* 5 light red */
+	{0, 0x5c5c, 0x3535, 0x6666}, /* 6 purple */
+	{0, 0xcece, 0x5c5c, 0x0000}, /* 7 orange */
+	{0, 0xc4c4, 0xa0a0, 0x0000}, /* 8 yellow */
+	{0, 0x7373, 0xd2d2, 0x1616}, /* 9 green */
+	{0, 0x1111, 0xa8a8, 0x7979}, /* 10 aqua */
+	{0, 0x5858, 0xa1a1, 0x9d9d}, /* 11 light aqua */
+	{0, 0x5757, 0x7979, 0x9e9e}, /* 12 blue */
+	{0, 0xa0d0, 0x42d4, 0x6562}, /* 13 light purple */
+	{0, 0x5555, 0x5757, 0x5353}, /* 14 grey */
+	{0, 0x8888, 0x8a8a, 0x8585}, /* 15 light grey */
 
 	{0, 0xd3d3, 0xd7d7, 0xcfcf}, /* 16 white */
 	{0, 0x2e2e, 0x3434, 0x3636}, /* 17 black */
diff --git a/src/fe-gtk/rawlog.c b/src/fe-gtk/rawlog.c
index d0564406..736013c9 100644
--- a/src/fe-gtk/rawlog.c
+++ b/src/fe-gtk/rawlog.c
@@ -154,20 +154,29 @@ open_rawlog (struct server *serv)
 void
 fe_add_rawlog (server *serv, char *text, int len, int outbound)
 {
+	char **split_text;
 	char *new_text;
+	int i;
 
 	if (!serv->gui->rawlog_window)
 		return;
 
-	new_text = malloc (len + 7);
+	split_text = g_strsplit (text, "\r\n", 0);
 
-	len = sprintf (new_text, "\0033>>\017 %s", text);
-	if (outbound)
+	for (i = 0; i < g_strv_length (split_text); i++)
 	{
-		new_text[1] = '4';
-		new_text[2] = '<';
-		new_text[3] = '<';
+		if (split_text[i][0] == 0)
+			break;
+
+		if (outbound)
+			new_text = g_strconcat ("\0034<<\017 ", split_text[i], NULL);
+		else
+			new_text = g_strconcat ("\0033>>\017 ", split_text[i], NULL);
+
+		gtk_xtext_append (GTK_XTEXT (serv->gui->rawlog_textlist)->buffer, new_text, strlen (new_text));
+
+		g_free (new_text);
 	}
-	gtk_xtext_append (GTK_XTEXT (serv->gui->rawlog_textlist)->buffer, new_text, len);
-	free (new_text);
+
+	g_strfreev (split_text);
 }
diff --git a/src/fe-gtk/setup.c b/src/fe-gtk/setup.c
index 9132de1f..dbeeb796 100644
--- a/src/fe-gtk/setup.c
+++ b/src/fe-gtk/setup.c
@@ -505,12 +505,13 @@ static const setting advanced_settings[] =
 #ifdef WIN32
 	{ST_ENTRY,  N_("Alternative fonts:"), P_OFFSETNL(hex_text_font_alternative), "Separate multiple entries with commas without spaces before or after.", 0, sizeof prefs.hex_text_font_alternative},
 #endif
-	{ST_NUMBER,	N_("Auto reconnect delay:"), P_OFFINTNL(hex_net_reconnect_delay), 0, 0, 9999},
-	{ST_NUMBER,	N_("Auto join delay:"), P_OFFINTNL(hex_irc_join_delay), 0, 0, 9999},
 	{ST_TOGGLE,	N_("Display MODEs in raw form"), P_OFFINTNL(hex_irc_raw_modes), 0, 0, 0},
 	{ST_TOGGLE,	N_("Whois on notify"), P_OFFINTNL(hex_notify_whois_online), N_("Sends a /WHOIS when a user comes online in your notify list."), 0, 0},
 	{ST_TOGGLE,	N_("Hide join and part messages"), P_OFFINTNL(hex_irc_conf_mode), N_("Hide channel join/part messages by default."), 0, 0},
 	{ST_TOGGLE,	N_("Display lists in compact mode"), P_OFFINTNL(hex_gui_compact), N_("Use less spacing between user list/channel tree rows."), 0, 0},
+	{ST_TOGGLE,	N_("Automatically reconnect to servers on disconnect"), P_OFFINTNL(hex_net_auto_reconnect), 0, 0, 1},
+	{ST_NUMBER,	N_("Auto reconnect delay:"), P_OFFINTNL(hex_net_reconnect_delay), 0, 0, 9999},
+	{ST_NUMBER,	N_("Auto join delay:"), P_OFFINTNL(hex_irc_join_delay), 0, 0, 9999},
 	{ST_HEADER,	N_("Auto Open DCC Windows"),0,0,0},
 	{ST_TOGGLE, N_("Send window"), P_OFFINTNL(hex_gui_autoopen_send), 0, 0, 0},
 	{ST_TOGGLE, N_("Receive window"), P_OFFINTNL(hex_gui_autoopen_recv), 0, 0, 0},
diff --git a/src/fe-gtk/userlistgui.c b/src/fe-gtk/userlistgui.c
index c2f2a462..530d213f 100644
--- a/src/fe-gtk/userlistgui.c
+++ b/src/fe-gtk/userlistgui.c
@@ -320,7 +320,7 @@ fe_userlist_rehash (session *sess, struct User *user)
 	if (!iter)
 		return;
 
-	if (prefs.hex_away_track && prefs.hex_away_size_max && user->away)
+	if (prefs.hex_away_track && user->away)
 		nick_color = COL_AWAY;
 	else if (prefs.hex_gui_ulist_color)
 		nick_color = text_color_of(user->nick);
@@ -340,7 +340,7 @@ fe_userlist_insert (session *sess, struct User *newuser, int row, int sel)
 	char *nick;
 	int nick_color = 0;
 
-	if (prefs.hex_away_track && prefs.hex_away_size_max && newuser->away)
+	if (prefs.hex_away_track && newuser->away)
 		nick_color = COL_AWAY;
 	else if (prefs.hex_gui_ulist_color)
 		nick_color = text_color_of(newuser->nick);