comparison mcabber/src/jabglue.c @ 1013:f1a9ca2348e5

Set the msg_flag when we leave a MUC room It should help the user to see when (s)he's kicked out of a room, for example.
author Mikael Berthe <mikael@lilotux.net>
date Sun, 12 Nov 2006 15:55:04 +0100
parents 54405d09b15a
children 99c5278bf6b8
comparison
equal deleted inserted replaced
1012:7f216b904315 1013:f1a9ca2348e5
1451 const char *actorjid = NULL, *reason = NULL; 1451 const char *actorjid = NULL, *reason = NULL;
1452 bool new_member = FALSE; // True if somebody else joins the room (not us) 1452 bool new_member = FALSE; // True if somebody else joins the room (not us)
1453 unsigned int statuscode = 0; 1453 unsigned int statuscode = 0;
1454 GSList *room_elt; 1454 GSList *room_elt;
1455 int log_muc_conf; 1455 int log_muc_conf;
1456 guint msgflags;
1456 1457
1457 log_muc_conf = settings_opt_get_int("log_muc_conf"); 1458 log_muc_conf = settings_opt_get_int("log_muc_conf");
1458 1459
1459 room_elt = roster_find(roomjid, jidsearch, 0); 1460 room_elt = roster_find(roomjid, jidsearch, 0);
1460 if (!room_elt) { 1461 if (!room_elt) {
1611 mbuf = g_strdup_printf("%s has left", rname); 1612 mbuf = g_strdup_printf("%s has left", rname);
1612 } 1613 }
1613 } 1614 }
1614 } 1615 }
1615 1616
1616 scr_WriteIncomingMessage(roomjid, mbuf, usttime, 1617 msgflags = HBB_PREFIX_INFO;
1617 HBB_PREFIX_INFO|HBB_PREFIX_NOFLAG); 1618 if (!we_left)
1619 msgflags |= HBB_PREFIX_NOFLAG;
1620
1621 scr_WriteIncomingMessage(roomjid, mbuf, usttime, msgflags);
1618 1622
1619 if (log_muc_conf) hlog_write_message(roomjid, 0, FALSE, mbuf); 1623 if (log_muc_conf) hlog_write_message(roomjid, 0, FALSE, mbuf);
1620 1624
1621 if (we_left) { 1625 if (we_left) {
1622 scr_LogPrint(LPRINT_LOGNORM, "%s", mbuf); 1626 scr_LogPrint(LPRINT_LOGNORM, "%s", mbuf);