comparison mcabber/src/commands.c @ 1528:4b4b3948420c

MUC fix: the topic couldn't be cleared
author Mikael Berthe <mikael@lilotux.net>
date Sat, 04 Oct 2008 13:03:42 +0200
parents ac87eef9050f
children 248da27faff3
comparison
equal deleted inserted replaced
1527:ac87eef9050f 1528:4b4b3948420c
2582 else 2582 else
2583 scr_LogPrint(LPRINT_NORMAL, "No topic has been set."); 2583 scr_LogPrint(LPRINT_NORMAL, "No topic has been set.");
2584 return; 2584 return;
2585 } 2585 }
2586 2586
2587 // If arg is "-", let's clear the topic
2588 if (!strcmp(arg, "-"))
2589 arg = NULL;
2590
2587 arg = to_utf8(arg); 2591 arg = to_utf8(arg);
2588 // Set the topic 2592 // Set the topic
2589 jb_send_msg(buddy_getjid(bud), NULL, ROSTER_TYPE_ROOM, arg, NULL, NULL, NULL); 2593 jb_send_msg(buddy_getjid(bud), NULL, ROSTER_TYPE_ROOM, arg ? arg : "",
2594 NULL, NULL, NULL);
2590 g_free(arg); 2595 g_free(arg);
2591 } 2596 }
2592 2597
2593 static void room_destroy(gpointer bud, char *arg) 2598 static void room_destroy(gpointer bud, char *arg)
2594 { 2599 {