Mercurial > hg
changeset 1435:9bf7f3ddff10
Do not send a groupchat-style message when changing a MUC room topic
Esp. bad when the permission is denied... (Reported by bb)
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sun, 24 Feb 2008 13:41:36 +0100 |
parents | bed2f0caa952 |
children | 6fb141142388 |
files | mcabber/src/commands.c mcabber/src/jabglue.c |
diffstat | 2 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/mcabber/src/commands.c Sat Feb 23 12:00:56 2008 +0100 +++ b/mcabber/src/commands.c Sun Feb 24 13:41:36 2008 +0100 @@ -2526,8 +2526,6 @@ static void room_topic(gpointer bud, char *arg) { - gchar *msg; - if (!buddy_getinsideroom(bud)) { scr_LogPrint(LPRINT_NORMAL, "You are not in this room."); return; @@ -2545,10 +2543,8 @@ arg = to_utf8(arg); // Set the topic - msg = g_strdup_printf("%s has set the topic to: %s", mkcmdstr("me"), arg); - jb_send_msg(buddy_getjid(bud), msg, ROSTER_TYPE_ROOM, arg, NULL, NULL, NULL); + jb_send_msg(buddy_getjid(bud), NULL, ROSTER_TYPE_ROOM, arg, NULL, NULL, NULL); g_free(arg); - g_free(msg); } static void room_destroy(gpointer bud, char *arg)
--- a/mcabber/src/jabglue.c Sat Feb 23 12:00:56 2008 +0100 +++ b/mcabber/src/jabglue.c Sun Feb 24 13:41:36 2008 +0100 @@ -601,7 +601,11 @@ if (encrypted) *encrypted = 0; - if (!online) return; + if (!online) + return; + + if (!text && type == ROSTER_TYPE_USER) + return; if (type_overwrite) strtype = type_overwrite;