summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/common/text.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/common/text.c b/src/common/text.c
index 60a069c9..eac31ba3 100644
--- a/src/common/text.c
+++ b/src/common/text.c
@@ -2098,7 +2098,8 @@ text_emit (int index, session *sess, char *a, char *b, char *c, char *d,
 		break;
 	}
 
-	sound_play_event (index);
+	if (!prefs.hex_away_omit_alerts || !sess->server->is_away)
+		sound_play_event (index);
 	display_event (sess, index, word, stripcolor_args, timestamp);
 }
 
@@ -2194,9 +2195,6 @@ sound_play (const char *file, gboolean quiet)
 	char *cmd;
 #endif
 
-	if (prefs.hex_away_omit_alerts)
-		return;
-
 	/* the pevents GUI editor triggers this after removing a soundfile */
 	if (!file[0])
 	{