# HG changeset patch # User Mikael Berthe # Date 1194892075 -3600 # Node ID c7e709719c43b60694e43d47a49252bc3e5342f8 # Parent ff1f6facdc0c6cd70c23c91eb9e797dffd762962 Small code cleanup diff -r ff1f6facdc0c -r c7e709719c43 mcabber/src/commands.c --- a/mcabber/src/commands.c Sun Nov 11 23:13:35 2007 +0100 +++ b/mcabber/src/commands.c Mon Nov 12 19:27:55 2007 +0100 @@ -363,6 +363,9 @@ char *xpline; cmd *curcmd; + if (!line) + return 0; + // We do alias expansion here if (iscmd || scr_get_multimode() != 2) xpline = expandalias(line); diff -r ff1f6facdc0c -r c7e709719c43 mcabber/src/jab_iq.c --- a/mcabber/src/jab_iq.c Sun Nov 11 23:13:35 2007 +0100 +++ b/mcabber/src/jab_iq.c Mon Nov 12 19:27:55 2007 +0100 @@ -338,11 +338,9 @@ x = xmlnode_get_tag(xml_result, "query"); if (!x) return -1; + ns = xmlnode_get_attrib(x, "xmlns"); - if (!ns) - return -1; - - if (!strcmp(ns, NS_ROSTER)) // The check is probably useless... + if (ns && !strcmp(ns, NS_ROSTER)) handle_iq_roster(x); // Post-login stuff diff -r ff1f6facdc0c -r c7e709719c43 mcabber/src/jabglue.c --- a/mcabber/src/jabglue.c Sun Nov 11 23:13:35 2007 +0100 +++ b/mcabber/src/jabglue.c Mon Nov 12 19:27:55 2007 +0100 @@ -505,10 +505,8 @@ room_presence.msg = msg; foreach_buddy(ROSTER_TYPE_ROOM, &roompresence, &room_presence); } - } - - if (online) { - // We'll need to update the roster if we switch to/from offline because + + // We'll have to update the roster if we switch to/from offline because // we don't know the presences of buddies when offline... if (mystatus == offline || st == offline) update_roster = TRUE; @@ -516,8 +514,10 @@ hk_mystatuschange(0, mystatus, st, (st != invisible ? msg : "")); mystatus = st; } + if (st) mywantedstatus = st; + if (msg != mystatusmsg) { g_free(mystatusmsg); if (*msg)