Remove patches applied upstream and update API numbers
authorMikael Berthe <mikael@lilotux.net>
Mon, 14 Mar 2011 13:35:45 +0100
changeset 17 79ba81eed5ad
parent 16 ca5a2f1def20
child 18 2714b95de09d
Remove patches applied upstream and update API numbers
cmd-del-id
cmd-dynamic-restriction-list
direct-invite
muc-multiple-statuses
series
switch-to-experimental
update-changelog-v30
update-changelog-v31
update-changelog-v32
update-changelog-v33
--- a/cmd-del-id	Sun Feb 27 21:07:13 2011 +0100
+++ b/cmd-del-id	Mon Mar 14 13:35:45 2011 +0100
@@ -1,20 +1,20 @@
-diff -r b4cb708eb500 mcabber/mcabber/api.h
---- a/mcabber/mcabber/api.h	Sun Feb 27 20:56:34 2011 +0100
-+++ b/mcabber/mcabber/api.h	Sun Feb 27 20:57:19 2011 +0100
+diff -r 6629da903728 mcabber/mcabber/api.h
+--- a/mcabber/mcabber/api.h	Mon Mar 14 13:29:58 2011 +0100
++++ b/mcabber/mcabber/api.h	Mon Mar 14 13:30:50 2011 +0100
 @@ -3,8 +3,8 @@
  
  #include <mcabber/config.h> // For MCABBER_BRANCH
  
 -#define MCABBER_API_VERSION 31
--#define MCABBER_API_MIN     30
+-#define MCABBER_API_MIN     31
 +#define MCABBER_API_VERSION 32
 +#define MCABBER_API_MIN     32
  
  extern const gchar *mcabber_branch;
  extern const guint mcabber_api_version;
-diff -r b4cb708eb500 mcabber/mcabber/commands.c
---- a/mcabber/mcabber/commands.c	Sun Feb 27 20:56:34 2011 +0100
-+++ b/mcabber/mcabber/commands.c	Sun Feb 27 20:57:19 2011 +0100
+diff -r 6629da903728 mcabber/mcabber/commands.c
+--- a/mcabber/mcabber/commands.c	Mon Mar 14 13:29:58 2011 +0100
++++ b/mcabber/mcabber/commands.c	Mon Mar 14 13:30:50 2011 +0100
 @@ -99,27 +99,26 @@
  #ifdef MODULES_ENABLE
  #include "modules.h"
@@ -57,9 +57,9 @@
  }
  
  //  cmd_init()
-diff -r b4cb708eb500 mcabber/mcabber/commands.h
---- a/mcabber/mcabber/commands.h	Sun Feb 27 20:56:34 2011 +0100
-+++ b/mcabber/mcabber/commands.h	Sun Feb 27 20:57:19 2011 +0100
+diff -r 6629da903728 mcabber/mcabber/commands.h
+--- a/mcabber/mcabber/commands.h	Mon Mar 14 13:29:58 2011 +0100
++++ b/mcabber/mcabber/commands.h	Mon Mar 14 13:30:50 2011 +0100
 @@ -20,8 +20,9 @@
  int  process_command(const char *line, guint iscmd);
  char *expandalias(const char *line);
@@ -72,9 +72,9 @@
  #endif
  
  void cmd_room_whois(gpointer bud, const char *nick, guint interactive);
-diff -r b4cb708eb500 mcabber/modules/beep/beep.c
---- a/mcabber/modules/beep/beep.c	Sun Feb 27 20:56:34 2011 +0100
-+++ b/mcabber/modules/beep/beep.c	Sun Feb 27 20:57:19 2011 +0100
+diff -r 6629da903728 mcabber/modules/beep/beep.c
+--- a/mcabber/modules/beep/beep.c	Mon Mar 14 13:29:58 2011 +0100
++++ b/mcabber/modules/beep/beep.c	Mon Mar 14 13:30:50 2011 +0100
 @@ -46,8 +46,9 @@
          .next            = NULL,
  };
--- a/cmd-dynamic-restriction-list	Sun Feb 27 21:07:13 2011 +0100
+++ b/cmd-dynamic-restriction-list	Mon Mar 14 13:35:45 2011 +0100
@@ -1,6 +1,6 @@
-diff -r 3f700d5ea047 mcabber/mcabber/api.h
---- a/mcabber/mcabber/api.h	Sun Feb 27 20:57:23 2011 +0100
-+++ b/mcabber/mcabber/api.h	Sun Feb 27 20:58:03 2011 +0100
+diff -r 7a014d472922 mcabber/mcabber/api.h
+--- a/mcabber/mcabber/api.h	Mon Mar 14 13:31:38 2011 +0100
++++ b/mcabber/mcabber/api.h	Mon Mar 14 13:32:17 2011 +0100
 @@ -3,7 +3,7 @@
  
  #include <mcabber/config.h> // For MCABBER_BRANCH
@@ -10,9 +10,9 @@
  #define MCABBER_API_MIN     32
  
  extern const gchar *mcabber_branch;
-diff -r 3f700d5ea047 mcabber/mcabber/commands.c
---- a/mcabber/mcabber/commands.c	Sun Feb 27 20:57:23 2011 +0100
-+++ b/mcabber/mcabber/commands.c	Sun Feb 27 20:58:03 2011 +0100
+diff -r 7a014d472922 mcabber/mcabber/commands.c
+--- a/mcabber/mcabber/commands.c	Mon Mar 14 13:31:38 2011 +0100
++++ b/mcabber/mcabber/commands.c	Mon Mar 14 13:32:17 2011 +0100
 @@ -95,6 +95,7 @@
  
  // Global variable for the commands list
@@ -81,9 +81,9 @@
    // Status category
    compl_add_category_word(COMPL_STATUS, "online");
    compl_add_category_word(COMPL_STATUS, "avail");
-diff -r 3f700d5ea047 mcabber/mcabber/commands.h
---- a/mcabber/mcabber/commands.h	Sun Feb 27 20:57:23 2011 +0100
-+++ b/mcabber/mcabber/commands.h	Sun Feb 27 20:58:03 2011 +0100
+diff -r 7a014d472922 mcabber/mcabber/commands.h
+--- a/mcabber/mcabber/commands.h	Mon Mar 14 13:31:38 2011 +0100
++++ b/mcabber/mcabber/commands.h	Mon Mar 14 13:32:17 2011 +0100
 @@ -23,7 +23,9 @@
  gpointer cmd_del(gpointer id);
  gpointer cmd_add(const char *name, const char *help, guint flags1, guint flags2,
@@ -94,9 +94,9 @@
  
  void cmd_room_whois(gpointer bud, const char *nick, guint interactive);
  void cmd_room_leave(gpointer bud, char *arg);
-diff -r 3f700d5ea047 mcabber/mcabber/settings.c
---- a/mcabber/mcabber/settings.c	Sun Feb 27 20:57:23 2011 +0100
-+++ b/mcabber/mcabber/settings.c	Sun Feb 27 20:58:03 2011 +0100
+diff -r 7a014d472922 mcabber/mcabber/settings.c
+--- a/mcabber/mcabber/settings.c	Mon Mar 14 13:31:38 2011 +0100
++++ b/mcabber/mcabber/settings.c	Mon Mar 14 13:32:17 2011 +0100
 @@ -185,44 +185,27 @@
  
      // We only allow assignments line, except for commands "pgp", "source",
--- a/direct-invite	Sun Feb 27 21:07:13 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,181 +0,0 @@
-diff -r 2e9ac7af8c9c mcabber/mcabber/api.h
---- a/mcabber/mcabber/api.h	Sun Feb 27 20:56:06 2011 +0100
-+++ b/mcabber/mcabber/api.h	Sun Feb 27 20:56:30 2011 +0100
-@@ -3,7 +3,7 @@
- 
- #include <mcabber/config.h> // For MCABBER_BRANCH
- 
--#define MCABBER_API_VERSION 30
-+#define MCABBER_API_VERSION 31
- #define MCABBER_API_MIN     30
- 
- extern const gchar *mcabber_branch;
-diff -r 2e9ac7af8c9c mcabber/mcabber/xmpp.c
---- a/mcabber/mcabber/xmpp.c	Sun Feb 27 20:56:06 2011 +0100
-+++ b/mcabber/mcabber/xmpp.c	Sun Feb 27 20:56:30 2011 +0100
-@@ -1299,6 +1299,18 @@
-     x = lm_message_node_find_xmlns(m->node, NS_MUC_USER);
-     if (x && !strcmp(x->name, "x"))
-       got_muc_message(from, x);
-+
-+    x = lm_message_node_find_xmlns(m->node, NS_X_CONFERENCE);
-+
-+    if (x && !strcmp(x->name, "x")) {
-+      const char *jid = lm_message_node_get_attribute(x, "jid");
-+      if (jid) {
-+        const char *reason = lm_message_node_get_attribute(x, "reason");
-+        const char *password = lm_message_node_get_attribute(x, "password");
-+        // FIXME we shouldn't send decline stanzas in this case
-+        got_invite(from, jid, reason, password, FALSE);
-+      }
-+    }
-   }
- 
-   return LM_HANDLER_RESULT_REMOVE_MESSAGE;
-diff -r 2e9ac7af8c9c mcabber/mcabber/xmpp_defines.h
---- a/mcabber/mcabber/xmpp_defines.h	Sun Feb 27 20:56:06 2011 +0100
-+++ b/mcabber/mcabber/xmpp_defines.h	Sun Feb 27 20:56:30 2011 +0100
-@@ -27,6 +27,8 @@
- #define NS_BROWSE    "jabber:iq:browse"
- #define NS_EVENT     "jabber:x:event"
- #define NS_CONFERENCE "jabber:iq:conference"
-+// direct muc invitation (xep-0249)
-+#define NS_X_CONFERENCE "jabber:x:conference"
- #define NS_SIGNED    "jabber:x:signed"
- #define NS_ENCRYPTED "jabber:x:encrypted"
- #define NS_GATEWAY   "jabber:iq:gateway"
-diff -r 2e9ac7af8c9c mcabber/mcabber/xmpp_helper.c
---- a/mcabber/mcabber/xmpp_helper.c	Sun Feb 27 20:56:06 2011 +0100
-+++ b/mcabber/mcabber/xmpp_helper.c	Sun Feb 27 20:56:30 2011 +0100
-@@ -234,6 +234,7 @@
-   caps_add_feature("", NS_PING);
-   caps_add_feature("", NS_COMMANDS);
-   caps_add_feature("", NS_RECEIPTS);
-+  caps_add_feature("", NS_X_CONFERENCE);
-   if (!settings_opt_get_int("iq_last_disable") &&
-       (!settings_opt_get_int("iq_last_disable_when_notavail") ||
-        status != notavail))
-diff -r 2e9ac7af8c9c mcabber/mcabber/xmpp_muc.c
---- a/mcabber/mcabber/xmpp_muc.c	Sun Feb 27 20:56:06 2011 +0100
-+++ b/mcabber/mcabber/xmpp_muc.c	Sun Feb 27 20:56:30 2011 +0100
-@@ -39,6 +39,8 @@
- extern enum imstatus mystatus;
- extern gchar *mystatusmsg;
- 
-+static GSList *invitations = NULL;
-+
- static void decline_invitation(event_muc_invitation *invitation, const char *reason)
- {
-   // cut and paste from xmpp_room_invite
-@@ -65,10 +67,12 @@
- 
- void destroy_event_muc_invitation(event_muc_invitation *invitation)
- {
-+  invitations = g_slist_remove(invitations, invitation);
-   g_free(invitation->to);
-   g_free(invitation->from);
-   g_free(invitation->passwd);
-   g_free(invitation->reason);
-+  g_free(invitation->evid);
-   g_free(invitation);
- }
- 
-@@ -104,7 +108,8 @@
-     g_free(nickname);
-   } else {
-     scr_LogPrint(LPRINT_LOGNORM, "Invitation to %s refused.", invitation->to);
--    decline_invitation(invitation, arg);
-+    if (invitation->reply)
-+      decline_invitation(invitation, arg);
-   }
- 
-   return FALSE;
-@@ -643,14 +648,12 @@
-   g_free(to);
- }
- 
--//  got_invite(from, to, reason, passwd)
-+//  got_invite(from, to, reason, passwd, reply)
- // This function should be called when receiving an invitation from user
- // "from", to enter the room "to".  Optional reason and room password can
- // be provided.
--// TODO: check for duplicate invites (need an existing invitation registry
--// for that).
--static void got_invite(const char* from, const char *to, const char* reason,
--                       const char* passwd)
-+void got_invite(const char* from, const char *to, const char* reason,
-+                const char* passwd, gboolean reply)
- {
-   GString *sbuf;
-   char *barejid;
-@@ -670,7 +673,21 @@
-   scr_WriteIncomingMessage(barejid, sbuf->str, 0, HBB_PREFIX_INFO, 0);
-   scr_LogPrint(LPRINT_LOGNORM, "%s", sbuf->str);
- 
--  {
-+  { // remove any equal older invites
-+    GSList *iel = invitations;
-+    while (iel) {
-+      event_muc_invitation *invitation = iel->data;
-+      iel = iel -> next;
-+      if (!g_strcmp0(to, invitation->to) &&
-+          !g_strcmp0(passwd, invitation->passwd)) {
-+        scr_LogPrint(LPRINT_DEBUG, "Destroying previous invitation event %s.",
-+                     invitation->evid);
-+        evs_del(invitation->evid);
-+      }
-+    }
-+  }
-+
-+  { // create event
-     const char *id;
-     char *desc = g_strdup_printf("<%s> invites you to %s", from, to);
-     event_muc_invitation *invitation;
-@@ -680,13 +697,18 @@
-     invitation->from = g_strdup(from);
-     invitation->passwd = g_strdup(passwd);
-     invitation->reason = g_strdup(reason);
-+    invitation->reply = reply;
-+    invitation->evid = NULL;
-+
-+    invitations = g_slist_append(invitations, invitation);
- 
-     id = evs_new(desc, NULL, 0, evscallback_invitation, invitation,
-                  (GDestroyNotify)destroy_event_muc_invitation);
-     g_free(desc);
--    if (id)
-+    if (id) {
-+      invitation->evid = g_strdup(id);
-       g_string_printf(sbuf, "Please use /event %s accept|reject", id);
--    else
-+    } else
-       g_string_printf(sbuf, "Unable to create a new event!");
-   }
-   scr_WriteIncomingMessage(barejid, sbuf->str, 0, HBB_PREFIX_INFO, 0);
-@@ -718,7 +740,7 @@
-     reason = lm_message_node_get_child_value(invite, "reason");
-     password = lm_message_node_get_child_value(invite, "password");
-     if (invite_from)
--      got_invite(invite_from, from, reason, password);
-+      got_invite(invite_from, from, reason, password, TRUE);
-   }
-   // TODO
-   // handle status code = 100 ( not anonymous )
-diff -r 2e9ac7af8c9c mcabber/mcabber/xmpp_muc.h
---- a/mcabber/mcabber/xmpp_muc.h	Sun Feb 27 20:56:06 2011 +0100
-+++ b/mcabber/mcabber/xmpp_muc.h	Sun Feb 27 20:56:30 2011 +0100
-@@ -6,10 +6,14 @@
-   char *from;
-   char *passwd;
-   char *reason;
-+  char *evid;
-+  gboolean reply;
- } event_muc_invitation;
- 
- void destroy_event_muc_invitation(event_muc_invitation *invitation);
- void roompresence(gpointer room, void *presencedata);
-+void got_invite(const char* from, const char *to, const char* reason,
-+                const char* passwd, gboolean reply);
- void got_muc_message(const char *from, LmMessageNode *x);
- void handle_muc_presence(const char *from, LmMessageNode * xmldata,
-                          const char *roomjid, const char *rname,
--- a/muc-multiple-statuses	Sun Feb 27 21:07:13 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,355 +0,0 @@
-diff -r 55ff4dc03f25 mcabber/mcabber/xmpp.c
---- a/mcabber/mcabber/xmpp.c	Fri Apr 23 13:01:53 2010 +0300
-+++ b/mcabber/mcabber/xmpp.c	Fri Apr 23 13:03:25 2010 +0300
-@@ -1299,7 +1299,7 @@
-   if (from) {
-     x = lm_message_node_find_xmlns(m->node, NS_MUC_USER);
-     if (x && !strcmp(x->name, "x"))
--      got_muc_message(from, x);
-+      got_muc_message(from, x, timestamp);
- 
-     x = lm_message_node_find_xmlns(m->node, NS_X_CONFERENCE);
- 
-diff -r 55ff4dc03f25 mcabber/mcabber/xmpp_muc.c
---- a/mcabber/mcabber/xmpp_muc.c	Fri Apr 23 13:01:53 2010 +0300
-+++ b/mcabber/mcabber/xmpp_muc.c	Fri Apr 23 13:03:25 2010 +0300
-@@ -400,8 +400,6 @@
-                          enum imstatus ust, const char *ustmsg,
-                          time_t usttime, char bpprio)
- {
--  LmMessageNode *y;
--  const char *p;
-   char *mbuf;
-   const char *ournick;
-   enum imrole mbrole = role_none;
-@@ -411,6 +409,7 @@
-   const char *mbjid = NULL, *mbnick = NULL;
-   const char *actorjid = NULL, *reason = NULL;
-   bool new_member = FALSE; // True if somebody else joins the room (not us)
-+  bool our_presence = FALSE; // True if this presence is from us (i.e. bears code 110)
-   guint statuscode = 0;
-   guint nickchange = 0;
-   GSList *room_elt;
-@@ -441,30 +440,92 @@
- 
-   if (!ournick) {
-     // It shouldn't happen, probably a server issue
--    mbuf = g_strdup_printf("Unexpected groupchat packet!");
--
--    scr_LogPrint(LPRINT_LOGNORM, "%s", mbuf);
--    scr_WriteIncomingMessage(roomjid, mbuf, 0, HBB_PREFIX_INFO, 0);
--    g_free(mbuf);
-+    scr_LogPrint(LPRINT_LOGNORM, "Unexpected groupchat packet!");
-+    scr_WriteIncomingMessage(roomjid, "Unexpected groupchat packet!", 0, HBB_PREFIX_INFO, 0);
-     // Send back an unavailable packet
-     xmpp_setstatus(offline, roomjid, "", TRUE);
-     scr_draw_roster();
-     return;
-   }
- 
--  // Get the status code
--  // 201: a room has been created
--  // 301: the user has been banned from the room
--  // 303: new room nickname
--  // 307: the user has been kicked from the room
--  // 321,322,332: the user has been removed from the room
--  y = lm_message_node_find_child(xmldata, "status");
--  if (y) {
--    p = lm_message_node_get_attribute(y, "code");
--    if (p)
--      statuscode = atoi(p);
-+#define SETSTATUSCODE(VALUE)                                              \
-+{                                                                         \
-+  if (G_UNLIKELY(statuscode))                                             \
-+    scr_LogPrint(LPRINT_DEBUG, "handle_muc_presence: WARNING: "           \
-+                 "replacing status code %u with %u.", statuscode, VALUE); \
-+  statuscode = VALUE;                                                     \
-+}
-+
-+  { // Get the status code
-+    LmMessageNode *node;
-+    for (node = xmldata -> children; node; node = node -> next) {
-+      if (!g_strcmp0(node -> name, "status")) {
-+        const char *codestr = lm_message_node_get_attribute(node, "code");
-+        if (codestr) {
-+          const char *mesg = NULL;
-+          switch (atoi(codestr)) {
-+            // initial
-+            case 100:
-+                    mesg = "The room is not anonymous.";
-+                    break;
-+            case 110: // It is our presence
-+                    our_presence = TRUE;
-+                    break;
-+            // initial
-+            case 170:
-+                    mesg = "The room is logged.";
-+                    break;
-+            // initial
-+            case 201: // Room created
-+                    SETSTATUSCODE(201);
-+                    break;
-+            // initial
-+            case 210: // Your nick change (on join)
-+                    // FIXME: print nick
-+                    mesg = "The room has changed your nick!";
-+                    buddy_setnickname(room_elt->data, rname);
-+                    ournick = rname;
-+                    break;
-+            case 301: // User banned
-+                    SETSTATUSCODE(301);
-+                    break;
-+            case 303: // Nick change
-+                    SETSTATUSCODE(303);
-+                    break;
-+            case 307: // User kicked
-+                    SETSTATUSCODE(307);
-+                    break;
-+                    // XXX (next three)
-+            case 321:
-+                    mesg = "User leaves room due to affilation change.";
-+                    break;
-+            case 322:
-+                    mesg = "User leaves room, as room is only for members now.";
-+                    break;
-+            case 332:
-+                    mesg = "User leaves room due to system shutdown.";
-+                    break;
-+            default:
-+                    scr_LogPrint(LPRINT_DEBUG, "handle_muc_presence: Unknown MUC status code: %s.", codestr);
-+                    break;
-+          }
-+          if (mesg) {
-+            scr_WriteIncomingMessage(roomjid, mesg, usttime,
-+                                     HBB_PREFIX_INFO|HBB_PREFIX_NOFLAG, 0);
-+            if (log_muc_conf)
-+              hlog_write_message(roomjid, 0, -1, mesg);
-+          }
-+        }
-+      }
-+    }
-   }
- 
-+#undef SETSTATUSCODE
-+
-+  if (!our_presence)
-+    if (ournick && !strcmp(ournick, rname))
-+      our_presence = TRUE;
-+
-   // Get the room's "print_status" settings
-   printstatus = buddy_getprintstatus(room_elt->data);
-   if (printstatus == status_default) {
-@@ -487,7 +548,7 @@
-     g_free(mbuf);
-     buddy_resource_setname(room_elt->data, rname, mbnick);
-     // Maybe it's _our_ nickname...
--    if (ournick && !strcmp(rname, ournick))
-+    if (our_presence)
-       buddy_setnickname(room_elt->data, mbnick);
-     nickchange = TRUE;
-   }
-@@ -496,7 +557,6 @@
-   if (statuscode != 303 && ust == offline) {
-     // Somebody is leaving
-     enum { leave=0, kick, ban } how = leave;
--    bool we_left = FALSE;
- 
-     if (statuscode == 307)
-       how = kick;
-@@ -504,8 +564,7 @@
-       how = ban;
- 
-     // If this is a leave, check if it is ourself
--    if (ournick && !strcmp(rname, ournick)) {
--      we_left = TRUE; // _We_ have left! (kicked, banned, etc.)
-+    if (our_presence) {
-       buddy_setinsideroom(room_elt->data, FALSE);
-       buddy_setnickname(room_elt->data, NULL);
-       buddy_del_all_resources(room_elt->data);
-@@ -530,7 +589,7 @@
-       }
-       if (reason)
-         reason_msg = g_strdup_printf("\nReason: %s", reason);
--      if (we_left)
-+      if (our_presence)
-         mbuf = g_strdup_printf("You have been %s%s", mbuf_end,
-                                reason_msg ? reason_msg : "");
-       else
-@@ -541,7 +600,7 @@
-       g_free(mbuf_end);
-     } else {
-       // Natural leave
--      if (we_left) {
-+      if (our_presence) {
-         LmMessageNode *destroynode = lm_message_node_find_child(xmldata,
-                                                                 "destroy");
-         if (destroynode) {
-@@ -574,9 +633,9 @@
- 
-     // Display the mbuf message if we're concerned
-     // or if the print_status isn't set to none.
--    if (we_left || printstatus != status_none) {
-+    if (our_presence || printstatus != status_none) {
-       msgflags = HBB_PREFIX_INFO;
--      if (!we_left && settings_opt_get_int("muc_flag_joins") != 2)
-+      if (!our_presence && settings_opt_get_int("muc_flag_joins") != 2)
-         msgflags |= HBB_PREFIX_NOFLAG;
-       scr_WriteIncomingMessage(roomjid, mbuf, usttime, msgflags, 0);
-     }
-@@ -584,26 +643,31 @@
-     if (log_muc_conf)
-       hlog_write_message(roomjid, 0, -1, mbuf);
- 
--    if (we_left) {
-+    if (our_presence) {
-       scr_LogPrint(LPRINT_LOGNORM, "%s", mbuf);
-       g_free(mbuf);
-       return;
-     }
-     g_free(mbuf);
--  } else if (buddy_getstatus(room_elt->data, rname) == offline &&
--             ust != offline) {
--    // Somebody is joining
--    new_member = muc_handle_join(room_elt, rname, roomjid, ournick,
--                                 printstatus, usttime, log_muc_conf);
-   } else {
--    // This is a simple member status change
-+    enum imstatus old_ust = buddy_getstatus(room_elt->data, rname);
-+    if (old_ust == offline && ust != offline) {
-+      // Somebody is joining
-+      new_member = muc_handle_join(room_elt, rname, roomjid, ournick,
-+                                   printstatus, usttime, log_muc_conf);
-+    } else {
-+      // This is a simple member status change
- 
--    if (printstatus == status_all && !nickchange) {
--      mbuf = g_strdup_printf("Member status has changed: %s [%c] %s", rname,
--                             imstatus2char[ust], ((ustmsg) ? ustmsg : ""));
--      scr_WriteIncomingMessage(roomjid, mbuf, usttime,
--                               HBB_PREFIX_INFO|HBB_PREFIX_NOFLAG, 0);
--      g_free(mbuf);
-+      if (printstatus == status_all && !nickchange) {
-+        const char *old_ustmsg = buddy_getstatusmsg(room_elt->data, rname);
-+        if (old_ust != ust || g_strcmp0(old_ustmsg, ustmsg)) {
-+          mbuf = g_strdup_printf("Member status has changed: %s [%c] %s", rname,
-+                                 imstatus2char[ust], ((ustmsg) ? ustmsg : ""));
-+          scr_WriteIncomingMessage(roomjid, mbuf, usttime,
-+                                 HBB_PREFIX_INFO|HBB_PREFIX_NOFLAG, 0);
-+          g_free(mbuf);
-+        }
-+      }
-     }
-   }
- 
-@@ -729,26 +793,87 @@
- 
- 
- // Specific MUC message handling (for example invitation processing)
--void got_muc_message(const char *from, LmMessageNode *x)
-+void got_muc_message(const char *from, LmMessageNode *x, time_t timestamp)
- {
--  LmMessageNode *invite = lm_message_node_get_child(x, "invite");
--  if (invite)
--  {
-+  LmMessageNode *node;
-+  // invitation
-+  node = lm_message_node_get_child(x, "invite");
-+  if (node) {
-     const char *invite_from;
-     const char *reason = NULL;
-     const char *password = NULL;
- 
--    invite_from = lm_message_node_get_attribute(invite, "from");
--    reason = lm_message_node_get_child_value(invite, "reason");
--    password = lm_message_node_get_child_value(invite, "password");
-+    invite_from = lm_message_node_get_attribute(node, "from");
-+    reason = lm_message_node_get_child_value(node, "reason");
-+    password = lm_message_node_get_child_value(node, "password");
-     if (invite_from)
-       got_invite(invite_from, from, reason, password, TRUE);
-   }
--  // TODO
--  // handle status code = 100 ( not anonymous )
--  // handle status code = 170 ( changement de config )
--  // 10.2.1 Notification of Configuration Changes
-+
-   // declined invitation
-+  node = lm_message_node_get_child(x, "decline");
-+  if (node) {
-+    const char *decline_from = lm_message_node_get_attribute(node, "from");
-+    const char *reason = lm_message_node_get_child_value(node, "reason");
-+    if (decline_from) {
-+      if (reason)
-+        scr_LogPrint(LPRINT_LOGNORM, "%s declines your invitation: %s.", from, reason);
-+      else
-+        scr_LogPrint(LPRINT_LOGNORM, "%s declines your invitation.", from);
-+    }
-+  }
-+
-+  // status codes
-+  for (node = x -> children; node; node = node -> next) {
-+    if (!g_strcmp0(node -> name, "status")) {
-+      const char *codestr = lm_message_node_get_attribute(node, "code");
-+      if (codestr) {
-+        const char *mesg = NULL;
-+        switch (atoi(codestr)) {
-+          // initial
-+          case 100:
-+                  mesg = "The room is not anonymous.";
-+                  break;
-+          case 101:
-+                  mesg = "Your affilation has changed while absent.";
-+                  break;
-+          case 102:
-+                  mesg = "The room shows unavailable members.";
-+                  break;
-+          case 103:
-+                  mesg = "The room does not show unavailable members.";
-+                  break;
-+          case 104:
-+                  mesg = "The room configuration has changed.";
-+                  break;
-+          case 170:
-+                  mesg = "The room is logged.";
-+                  break;
-+          case 171:
-+                  mesg = "The room is not logged.";
-+                  break;
-+          case 172:
-+                  mesg = "The room is not anonymous.";
-+                  break;
-+          case 173:
-+                  mesg = "The room is semi-anonymous.";
-+                  break;
-+          case 174:
-+                  mesg = "The room is anonymous.";
-+                  break;
-+          default:
-+                  scr_LogPrint(LPRINT_DEBUG, "got_muc_message: Unknown MUC status code: %s.", codestr);
-+                  break;
-+        }
-+        if (mesg) {
-+          scr_WriteIncomingMessage(from, mesg, timestamp,
-+                                   HBB_PREFIX_INFO|HBB_PREFIX_NOFLAG, 0);
-+        if (settings_opt_get_int("log_muc_conf"))
-+            hlog_write_message(from, 0, -1, mesg);
-+        }
-+      }
-+    }
-+  }
- }
- 
- /* vim: set et cindent cinoptions=>2\:2(0 ts=2 sw=2:  For Vim users... */
-diff -r 55ff4dc03f25 mcabber/mcabber/xmpp_muc.h
---- a/mcabber/mcabber/xmpp_muc.h	Fri Apr 23 13:01:53 2010 +0300
-+++ b/mcabber/mcabber/xmpp_muc.h	Fri Apr 23 13:03:25 2010 +0300
-@@ -14,7 +14,8 @@
- void roompresence(gpointer room, void *presencedata);
- void got_invite(const char* from, const char *to, const char* reason,
-                 const char* passwd, gboolean reply);
--void got_muc_message(const char *from, LmMessageNode *x);
-+void got_muc_message(const char *from, LmMessageNode *x,
-+                     time_t timestamp);
- void handle_muc_presence(const char *from, LmMessageNode * xmldata,
-                          const char *roomjid, const char *rname,
-                          enum imstatus ust, const char *ustmsg,
--- a/series	Sun Feb 27 21:07:13 2011 +0100
+++ b/series	Mon Mar 14 13:35:45 2011 +0100
@@ -3,11 +3,8 @@
 modularize-extcmd
 guard-xmpp-password
 roster-state-colors
-direct-invite
-update-changelog-v30
-muc-multiple-statuses
 cmd-del-id
-update-changelog-v31
+update-changelog-v32
 cmd-dynamic-restriction-list
-update-changelog-v32
+update-changelog-v33
 extend-caps
--- a/switch-to-experimental	Sun Feb 27 21:07:13 2011 +0100
+++ b/switch-to-experimental	Mon Mar 14 13:35:45 2011 +0100
@@ -1,25 +1,22 @@
-diff -r 098b7b5b4854 mcabber/ChangeLog.api
---- a/mcabber/ChangeLog.api	Sun Feb 27 19:47:39 2011 +0100
-+++ b/mcabber/ChangeLog.api	Sun Feb 27 20:55:47 2011 +0100
-@@ -6,6 +6,15 @@
- 
-   -- Mikael Berthe, 2010-05-16
- 
-+experimental (29)
+diff -r 9f443617e96b mcabber/ChangeLog.api
+--- a/mcabber/ChangeLog.api	Mon Mar 14 13:17:17 2011 +0100
++++ b/mcabber/ChangeLog.api	Mon Mar 14 13:29:44 2011 +0100
+@@ -1,3 +1,12 @@
++experimental (31)
 +
 + * Change branch to "experimental".
-+ * Api as defined by dev:15
++ * Api as defined by dev:17
 + * Add MCABBER_BRANCH_EXPERIMENTAL define to api.h
 + * MQ Patch: switch-to-experimental
 +
 +  -- Myhailo Danylenko, 2010-04-01
 +
- dev (15)
+ dev (17)
  
-  * Add "hook-subscription" hook
-diff -r 098b7b5b4854 mcabber/configure.ac
---- a/mcabber/configure.ac	Sun Feb 27 19:47:39 2011 +0100
-+++ b/mcabber/configure.ac	Sun Feb 27 20:55:47 2011 +0100
+  * Add NS_X_CONFERENCE (direct MUC invitations)
+diff -r 9f443617e96b mcabber/configure.ac
+--- a/mcabber/configure.ac	Mon Mar 14 13:17:17 2011 +0100
++++ b/mcabber/configure.ac	Mon Mar 14 13:29:44 2011 +0100
 @@ -272,7 +272,7 @@
  AM_CONDITIONAL([INSTALL_HEADERS], [test x$enable_modules != xno])
  
@@ -29,17 +26,17 @@
  AC_DEFINE([MCABBER_VERSION], "AC_PACKAGE_VERSION", [Mcabber version string])
  
  # We need _GNU_SOURCE for strptime() and strcasestr()
-diff -r 098b7b5b4854 mcabber/mcabber/api.h
---- a/mcabber/mcabber/api.h	Sun Feb 27 19:47:39 2011 +0100
-+++ b/mcabber/mcabber/api.h	Sun Feb 27 20:55:47 2011 +0100
+diff -r 9f443617e96b mcabber/mcabber/api.h
+--- a/mcabber/mcabber/api.h	Mon Mar 14 13:17:17 2011 +0100
++++ b/mcabber/mcabber/api.h	Mon Mar 14 13:29:44 2011 +0100
 @@ -3,8 +3,8 @@
  
  #include <mcabber/config.h> // For MCABBER_BRANCH
  
--#define MCABBER_API_VERSION 16
+-#define MCABBER_API_VERSION 17
 -#define MCABBER_API_MIN     13
-+#define MCABBER_API_VERSION 30
-+#define MCABBER_API_MIN     30
++#define MCABBER_API_VERSION 31
++#define MCABBER_API_MIN     31
  
  extern const gchar *mcabber_branch;
  extern const guint mcabber_api_version;
--- a/update-changelog-v30	Sun Feb 27 21:07:13 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-diff -r 0000398219df mcabber/ChangeLog.api
---- a/mcabber/ChangeLog.api	Fri Apr 23 13:00:09 2010 +0300
-+++ b/mcabber/ChangeLog.api	Fri Apr 23 13:01:53 2010 +0300
-@@ -1,3 +1,10 @@
-+experimental (30)
-+
-+ * Add NS_X_CONFERENCE (direct invitation)
-+ * MQ Patch: direct-invite
-+
-+  -- Myhailo Danylenko, 2010-04-04
-+
- experimental (29)
- 
-  * Change branch to "experimental".
--- a/update-changelog-v31	Sun Feb 27 21:07:13 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-diff -r 7866a7cb7619 mcabber/ChangeLog.api
---- a/mcabber/ChangeLog.api	Fri Apr 23 13:04:19 2010 +0300
-+++ b/mcabber/ChangeLog.api	Fri Apr 23 13:05:35 2010 +0300
-@@ -1,3 +1,12 @@
-+experimental (31)
-+
-+ * cmd_add now returns gpointer id
-+ * cmd_del accepts gpointer id instead of command name
-+ * Min API version 31
-+ * MQ Patch: cmd-del-id
-+
-+  -- Myhailo Danylenko, 2010-04-05
-+
- experimental (30)
- 
-  * Add NS_X_CONFERENCE (direct invitation)
--- a/update-changelog-v32	Sun Feb 27 21:07:13 2011 +0100
+++ b/update-changelog-v32	Mon Mar 14 13:35:45 2011 +0100
@@ -1,6 +1,6 @@
-diff -r 1a321db26ef3 mcabber/ChangeLog.api
---- a/mcabber/ChangeLog.api	Fri Apr 23 13:07:28 2010 +0300
-+++ b/mcabber/ChangeLog.api	Fri Apr 23 13:08:24 2010 +0300
+diff -r 562fcf869ce8 mcabber/ChangeLog.api
+--- a/mcabber/ChangeLog.api	Mon Mar 14 13:30:50 2011 +0100
++++ b/mcabber/ChangeLog.api	Mon Mar 14 13:31:38 2011 +0100
 @@ -1,3 +1,10 @@
 +experimental (32)
 +
@@ -11,4 +11,4 @@
 +
  experimental (31)
  
-  * cmd_add now returns gpointer id
+  * Change branch to "experimental".
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/update-changelog-v33	Mon Mar 14 13:35:45 2011 +0100
@@ -0,0 +1,14 @@
+diff -r 0b874e35f9ec mcabber/ChangeLog.api
+--- a/mcabber/ChangeLog.api	Mon Mar 14 13:34:11 2011 +0100
++++ b/mcabber/ChangeLog.api	Mon Mar 14 13:34:23 2011 +0100
+@@ -1,3 +1,10 @@
++experimental (33)
++
++ * Add cmd_set_safe() and cmd_is_safe()
++ * MQ Patch: cmd-dynamic-restriction-list
++
++  -- Myhailo Danylenko, 2010-04-06
++
+ experimental (32)
+ 
+  * Add cmd_set_safe() and cmd_is_safe()