about summary refs log tree commit diff stats
path: root/src/ui
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2016-02-04 00:45:37 +0000
committerJames Booth <boothj5@gmail.com>2016-02-04 00:45:37 +0000
commite1962261a90ceb12860ad64c564a610730c2cc6f (patch)
tree1d22c98fa0d3a533141da311c700923cde703402 /src/ui
parentc14ef3390690d732c64bf88a37b23dcdebb6e867 (diff)
downloadprofani-tty-e1962261a90ceb12860ad64c564a610730c2cc6f.tar.gz
Tidy notify_room_message()
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/notifier.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/ui/notifier.c b/src/ui/notifier.c
index fda5aedd..23d942fb 100644
--- a/src/ui/notifier.c
+++ b/src/ui/notifier.c
@@ -117,11 +117,16 @@ notify_message(const char *const name, int num, const char *const text)
 }
 
 void
-notify_room_message(const char *const nick, const char *const room, int win, const char *const text)
+notify_room_message(const char *const nick, const char *const room, int num, const char *const text)
 {
+    int ui_index = num;
+    if (ui_index == 10) {
+        ui_index = 0;
+    }
+
     GString *message = g_string_new("");
-    g_string_append_printf(message, "%s in %s (win %d)", nick, room, win);
-    if (text) {
+    g_string_append_printf(message, "%s in %s (win %d)", nick, room, ui_index);
+    if (text && prefs_get_boolean(PREF_NOTIFY_ROOM_TEXT)) {
         g_string_append_printf(message, "\n%s", text);
     }