about summary refs log tree commit diff stats
path: root/src/ui
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-07-16 20:03:08 +0100
committerJames Booth <boothj5@gmail.com>2014-07-16 20:03:08 +0100
commitaa8872875f7d26d9972debde9becf907864e6125 (patch)
tree06d29c407d5b87f1ffa6c0d3cf66996aa4c549f7 /src/ui
parent5872c4b55451a84e1a76fd00d58fe49648d48964 (diff)
parent4624eabb750d548ae3bddc5a8e73557f7a292330 (diff)
downloadprofani-tty-aa8872875f7d26d9972debde9becf907864e6125.tar.gz
Merge branch 'master' into winbuffers
Conflicts:
	src/ui/core.c
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/core.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/ui/core.c b/src/ui/core.c
index c53a3bbb..53a36f2d 100644
--- a/src/ui/core.c
+++ b/src/ui/core.c
@@ -1595,9 +1595,14 @@ _ui_room_message(const char * const room_jid, const char * const nick,
 {
     ProfWin *window = wins_get_by_recipient(room_jid);
     int num = wins_get_num(window);
+    char *my_nick = muc_get_room_nick(room_jid);
 
-    if (strcmp(nick, muc_get_room_nick(room_jid)) != 0) {
-        win_save_print(window, '-', NULL, 1, 0, nick, message);
+    if (strcmp(nick, my_nick) != 0) {
+        if (g_strrstr(message, my_nick) != NULL) {
+            win_save_print(window, '-', NULL, 1, COLOUR_ROOMMENTION, nick, message);
+        } else {
+            win_save_print(window, '-', NULL, 1, 0, nick, message);
+        }
     } else {
         win_save_print(window, '-', NULL, 0, 0, nick, message);
     }
@@ -1616,7 +1621,7 @@ _ui_room_message(const char * const room_jid, const char * const nick,
             win_update_virtual(current);
         }
 
-        if (strcmp(nick, muc_get_room_nick(room_jid)) != 0) {
+        if (strcmp(nick, my_nick) != 0) {
             if (prefs_get_boolean(PREF_FLASH)) {
                 flash();
             }