summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorPatrick Griffis <tingping@tingping.se>2016-03-30 08:28:51 -0400
committerPatrick Griffis <tingping@tingping.se>2016-03-30 08:28:51 -0400
commitf656569eb92ad7fe781d1db9e58112c633ded604 (patch)
treee9b87ae00f9484eda47ff967f225c6fb8d516794
parent0635e91dd6f43ae4944e845cc44a429dbd2352fb (diff)
plugin: Fix padding for chanopts in channel flags
This is an API break but it didn't really work
properly before anyway.

Fixes #1666
-rw-r--r--src/common/plugin.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/common/plugin.c b/src/common/plugin.c
index 6d362ffb..5fb864ae 100644
--- a/src/common/plugin.c
+++ b/src/common/plugin.c
@@ -1567,6 +1567,14 @@ hexchat_list_int (hexchat_plugin *ph, hexchat_list *xlist, const char *name)
 		case 0xd1b:	/* id */
 			return ((struct session *)data)->server->id;
 		case 0x5cfee87:	/* flags */
+			/* used if alert_taskbar is unset */                 /* 20 */
+			tmp <<= 1;
+			tmp |= ((struct session *)data)->alert_taskbar;      /* 19 */
+			tmp <<= 1;
+			/* used if alert_tray is unset */                    /* 18 */
+			tmp <<= 1;
+			tmp |= ((struct session *)data)->alert_tray;         /* 17 */
+			tmp <<= 1;
 			/* used if text_strip is unset */                    /* 16 */
 			tmp <<= 1;
 			tmp |= ((struct session *)data)->text_strip;          /* 15 */
@@ -1579,9 +1587,9 @@ hexchat_list_int (hexchat_plugin *ph, hexchat_list *xlist, const char *name)
 			tmp <<= 1;
 			tmp |= ((struct session *)data)->text_logging;       /* 11 */
 			tmp <<= 1;
-			tmp |= ((struct session *)data)->alert_taskbar;      /* 10 */
+			/* unused for historical reasons */                  /* 10 */
 			tmp <<= 1;
-			tmp |= ((struct session *)data)->alert_tray;         /* 9 */
+			/* used if alert_beep is unset */                    /* 9 */
 			tmp <<= 1;
 			tmp |= ((struct session *)data)->alert_beep;         /* 8 */
 			tmp <<= 1;