about summary refs log tree commit diff stats
path: root/src/ui/notifier.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2016-02-04 00:41:53 +0000
committerJames Booth <boothj5@gmail.com>2016-02-04 00:41:53 +0000
commitc14ef3390690d732c64bf88a37b23dcdebb6e867 (patch)
tree541eee3a0f732e719a5b63970c83af47838208ec /src/ui/notifier.c
parentf8f9ad51979680e9aef316f637d8cf6d3bde1bc5 (diff)
downloadprofani-tty-c14ef3390690d732c64bf88a37b23dcdebb6e867.tar.gz
Tidy notify_message()
Diffstat (limited to 'src/ui/notifier.c')
-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 30497fe3..fda5aedd 100644
--- a/src/ui/notifier.c
+++ b/src/ui/notifier.c
@@ -98,11 +98,16 @@ notify_invite(const char *const from, const char *const room, const char *const
 }
 
 void
-notify_message(const char *const name, int win, const char *const text)
+notify_message(const char *const name, 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 (win %d)", name, win);
-    if (text) {
+    g_string_append_printf(message, "%s (win %d)", name, ui_index);
+    if (text && prefs_get_boolean(PREF_NOTIFY_CHAT_TEXT)) {
         g_string_append_printf(message, "\n%s", text);
     }