Mercurial > hg
diff mcabber/src/jabglue.c @ 549:448e299e45da
MUC: "/room topic" shows the current room topic
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sun, 27 Nov 2005 21:38:53 +0100 |
parents | 1df26ff0ed8c |
children | 64cb4de94972 |
line wrap: on
line diff
--- a/mcabber/src/jabglue.c Sun Nov 27 21:26:55 2005 +0100 +++ b/mcabber/src/jabglue.c Sun Nov 27 21:38:53 2005 +0100 @@ -1235,6 +1235,7 @@ p = xmlnode_get_tag_data(xmldata, "subject"); if (p != NULL) { if (type && !strcmp(type, TMSG_GROUPCHAT)) { // Room topic + GSList *roombuddy; gchar *mbuf; gchar *subj_noutf8 = from_utf8(p); if (!subj_noutf8) @@ -1245,6 +1246,10 @@ r = strchr(s, '/'); if (r) *r++ = 0; else r = s; + // Set the new topic + roombuddy = roster_find(s, jidsearch, 0); + 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 : "(?)"));