summary refs log tree commit diff stats
path: root/src/common
diff options
context:
space:
mode:
authorPatrick Griffis <tingping@tingping.se>2017-06-10 16:28:48 -0400
committerPatrick Griffis <tingping@tingping.se>2017-06-10 16:28:48 -0400
commit2edf50d4ddc61ce6f73bf02263c9bdd09632c66b (patch)
tree07ba71457793e8d147fc6734e007576fc7c89f7d /src/common
parent2dd5f8788c1f9c6dd93356544ad04c946bc68fff (diff)
Actually respect away_omit_alerts for custom sounds...
Probably should think before merging things.
Diffstat (limited to 'src/common')
-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])
 	{