summary refs log tree commit diff stats
path: root/src
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
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')
-rw-r--r--src/common/cfgfiles.c1
-rw-r--r--src/common/hexchat.h1
-rw-r--r--src/common/text.c6
-rw-r--r--src/fe-gtk/setup.c1
4 files changed, 9 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);
diff --git a/src/fe-gtk/setup.c b/src/fe-gtk/setup.c
index ff0126e0..ddd13b90 100644
--- a/src/fe-gtk/setup.c
+++ b/src/fe-gtk/setup.c
@@ -482,6 +482,7 @@ static const setting general_settings[] =
 	{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_("Hide nick change messages"), P_OFFINTNL(hex_irc_hide_nickchange), 0, 0, 0},
 
 	{ST_END, 0, 0, 0, 0, 0}
 };