summary refs log tree commit diff stats
path: root/src/common
diff options
context:
space:
mode:
authorBerke Viktor <github.bviktor@outlook.com>2014-05-06 19:22:09 +0200
committerTingPing <tingping@tingping.se>2014-05-12 05:01:24 -0400
commit0dccf692d41f62611b0b8c753ef4e84be670c736 (patch)
tree3b0fdeac55cfbc667bc0c95a946a1fb2c8571d3c /src/common
parent7435572282b4ef6ea2487442ef4d34984d28d9c2 (diff)
Add global option to suppress nick change events
Might as well add a per-channel option, too but for me that seems a bit unnecessary.
Closes #971
Diffstat (limited to 'src/common')
-rw-r--r--src/common/cfgfiles.c1
-rw-r--r--src/common/hexchat.h1
-rw-r--r--src/common/text.c6
3 files changed, 8 insertions, 0 deletions
diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c
index 1207ff69..67645a66 100644
--- a/src/common/cfgfiles.c
+++ b/src/common/cfgfiles.c
@@ -509,6 +509,7 @@ const struct prefs vars[] =
 	{"irc_cap_server_time", P_OFFINT (hex_irc_cap_server_time), TYPE_BOOL},
 	{"irc_conf_mode", P_OFFINT (hex_irc_conf_mode), TYPE_BOOL},
 	{"irc_extra_hilight", P_OFFSET (hex_irc_extra_hilight), TYPE_STR},
+	{"irc_hide_nickchange", P_OFFINT (hex_irc_hide_nickchange), TYPE_BOOL},
 	{"irc_hide_version", P_OFFINT (hex_irc_hide_version), TYPE_BOOL},
 	{"irc_hidehost", P_OFFINT (hex_irc_hidehost), TYPE_BOOL},
 	{"irc_id_ntext", P_OFFSET (hex_irc_id_ntext), TYPE_STR},
diff --git a/src/common/hexchat.h b/src/common/hexchat.h
index 1c48fe71..44531468 100644
--- a/src/common/hexchat.h
+++ b/src/common/hexchat.h
@@ -217,6 +217,7 @@ struct hexchatprefs
 	unsigned int hex_irc_auto_rejoin;
 	unsigned int hex_irc_conf_mode;
 	unsigned int hex_irc_hidehost;
+	unsigned int hex_irc_hide_nickchange;
 	unsigned int hex_irc_hide_version;
 	unsigned int hex_irc_invisible;
 	unsigned int hex_irc_logging;
diff --git a/src/common/text.c b/src/common/text.c
index 0e66c2d2..ec407833 100644
--- a/src/common/text.c
+++ b/src/common/text.c
@@ -2173,6 +2173,12 @@ text_emit (int index, session *sess, char *a, char *b, char *c, char *d,
 		if (sess->alert_tray == SET_ON)
 			fe_tray_set_icon (FE_ICON_MESSAGE);
 		break;
+
+	/* ===Nick change message=== */
+	case XP_TE_CHANGENICK:
+		if (prefs.hex_irc_hide_nickchange)
+			return;
+		break;
 	}
 
 	sound_play_event (index);