diff options
author | James Booth <boothj5@gmail.com> | 2016-02-04 00:45:37 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2016-02-04 00:45:37 +0000 |
commit | e1962261a90ceb12860ad64c564a610730c2cc6f (patch) | |
tree | 1d22c98fa0d3a533141da311c700923cde703402 /src/ui | |
parent | c14ef3390690d732c64bf88a37b23dcdebb6e867 (diff) | |
download | profani-tty-e1962261a90ceb12860ad64c564a610730c2cc6f.tar.gz |
Tidy notify_room_message()
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/notifier.c | 11 |
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); } |