summary refs log tree commit diff stats
path: root/src/common
diff options
context:
space:
mode:
authorBerke Viktor <bviktor@hexchat.org>2012-10-15 13:46:23 +0200
committerBerke Viktor <bviktor@hexchat.org>2012-10-15 13:46:23 +0200
commit831794e150d890a64fc889887334accec4dd822a (patch)
tree7893c2a6e8ee937ec86df5af8c687c57bd3f16e6 /src/common
parente8f7653cf0f315fcb75c434c4a46af28d80f2ec2 (diff)
Only omit alerts when we're actually away
Diffstat (limited to 'src/common')
-rw-r--r--src/common/text.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/common/text.c b/src/common/text.c
index 20e4fd45..6736d632 100644
--- a/src/common/text.c
+++ b/src/common/text.c
@@ -2203,9 +2203,9 @@ text_emit (int index, session *sess, char *a, char *b, char *c, char *d)
 	case XP_TE_DPRIVMSG:
 	case XP_TE_PRIVACTION:
 	case XP_TE_DPRIVACTION:
-		if (chanopt_is_set_a (prefs.input_beep_priv, sess->alert_beep) && !prefs.away_omit_alerts)
+		if (chanopt_is_set_a (prefs.input_beep_priv, sess->alert_beep) && (!prefs.away_omit_alerts || !sess->server->is_away))
 			sound_beep (sess);
-		if (chanopt_is_set_a (prefs.input_flash_priv, sess->alert_taskbar) && !prefs.away_omit_alerts)
+		if (chanopt_is_set_a (prefs.input_flash_priv, sess->alert_taskbar) && (!prefs.away_omit_alerts || !sess->server->is_away))
 			fe_flash_window (sess);
 		/* why is this one different? because of plugin-tray.c's hooks! ugly */
 		if (sess->alert_tray == SET_ON)
@@ -2215,9 +2215,9 @@ text_emit (int index, session *sess, char *a, char *b, char *c, char *d)
 	/* ===Highlighted message=== */
 	case XP_TE_HCHANACTION:
 	case XP_TE_HCHANMSG:
-		if (chanopt_is_set_a (prefs.input_beep_hilight, sess->alert_beep) && !prefs.away_omit_alerts)
+		if (chanopt_is_set_a (prefs.input_beep_hilight, sess->alert_beep) && (!prefs.away_omit_alerts || !sess->server->is_away))
 			sound_beep (sess);
-		if (chanopt_is_set_a (prefs.input_flash_hilight, sess->alert_taskbar) && !prefs.away_omit_alerts)
+		if (chanopt_is_set_a (prefs.input_flash_hilight, sess->alert_taskbar) && (!prefs.away_omit_alerts || !sess->server->is_away))
 			fe_flash_window (sess);
 		if (sess->alert_tray == SET_ON)
 			fe_tray_set_icon (FE_ICON_MESSAGE);
@@ -2226,9 +2226,9 @@ text_emit (int index, session *sess, char *a, char *b, char *c, char *d)
 	/* ===Channel message=== */
 	case XP_TE_CHANACTION:
 	case XP_TE_CHANMSG:
-		if (chanopt_is_set_a (prefs.input_beep_chans, sess->alert_beep) && !prefs.away_omit_alerts)
+		if (chanopt_is_set_a (prefs.input_beep_chans, sess->alert_beep) && (!prefs.away_omit_alerts || !sess->server->is_away))
 			sound_beep (sess);
-		if (chanopt_is_set_a (prefs.input_flash_chans, sess->alert_taskbar) && !prefs.away_omit_alerts)
+		if (chanopt_is_set_a (prefs.input_flash_chans, sess->alert_taskbar) && (!prefs.away_omit_alerts || !sess->server->is_away))
 			fe_flash_window (sess);
 		if (sess->alert_tray == SET_ON)
 			fe_tray_set_icon (FE_ICON_MESSAGE);