diff mcabber/src/jabglue.c @ 560:64cb4de94972

Better topic attribution Better topic attribution, when getting history from the server.
author Mikael Berthe <mikael@lilotux.net>
date Thu, 01 Dec 2005 23:54:22 +0100
parents 448e299e45da
children 7fc678ac3bc6
line wrap: on
line diff
--- a/mcabber/src/jabglue.c	Thu Dec 01 23:47:16 2005 +0100
+++ b/mcabber/src/jabglue.c	Thu Dec 01 23:54:22 2005 +0100
@@ -1251,8 +1251,14 @@
       if (roombuddy)
         buddy_settopic(roombuddy->data, subj_noutf8);
       // Display inside the room window
-      mbuf = g_strdup_printf("%s has set the topic to: %s", r,
-                             (subj_noutf8 ? subj_noutf8 : "(?)"));
+      if (r == s) {
+        // No specific resource (this is certainly history)
+        mbuf = g_strdup_printf("The topic has been set to: %s",
+                               (subj_noutf8 ? subj_noutf8 : "(?)"));
+      } else {
+        mbuf = g_strdup_printf("%s has set the topic to: %s", r,
+                               (subj_noutf8 ? subj_noutf8 : "(?)"));
+      }
       scr_WriteIncomingMessage(s, mbuf, 0,
                                HBB_PREFIX_INFO|HBB_PREFIX_NOFLAG);
       if (settings_opt_get_int("log_muc_conf"))