rem: updateUserList(); 
add: reSortUserlist(userList);  if (("userlistSelection" in obj) && obj.userlistSelection) setSelectedNicknames(userList, obj.userlistSelection); 
context: function setCurrentObject (obj){    function clearList()    {        client.rdf.Unassert (client.rdf.resNullChan, client.rdf.resChanUser,                             client.rdf.resNullUser, true);    };    if (!ASSERT(obj.messages, "INVALID OBJECT passed to setCurrentObject **"))        return;    if ("currentObject" in client && client.currentObject == obj)        return;    var tb, userList;    if ("currentObject" in client && client.currentObject)    {        tb = getTabForObject(client.currentObject);    }    if (tb)    {        tb.selected = false;        tb.setAttribute ("state", "normal");    }    /* Unselect currently selected users. */    userList = document.getElementById("user-list");    /* If the splitter's collapsed, the userlist *isn't* visible, but we'll not     * get told when it becomes visible, so update it even if it's only the     * splitter visible. */    if (isVisible("user-list-box") || isVisible("main-splitter"))    {        /* Remove currently selected items before this tree gets rerooted,         * because it seems to remember the selections for eternity if not. */        if (userList.view && userList.view.selection)            userList.view.selection.select(-1);        if (obj.TYPE == "IRCChannel")        {            client.rdf.setTreeRoot("user-list", obj.getGraphResource());            updateUserList();        }        else        {            var rdf = client.rdf;            rdf.setTreeRoot("user-list", rdf.resNullChan);            rdf.Assert (rdf.resNullChan, rdf.resChanUser, rdf.resNullUser,                        true);            setTimeout(clearList, 100);        }    }    client.currentObject = obj;    tb = dispatch("create-tab-for-view", { view: obj });    if (tb)    {        tb.selected = true;        tb.setAttribute ("state", "current");    }    var vk = Number(tb.getAttribute("viewKey"));    delete client.activityList[vk];    client.deck.selectedIndex = vk;    updateTitle();    updateProgress();    updateSecurityIcon();    if (client.PRINT_DIRECTION == 1)        scrollDown(obj.frame, false);    // Input area should have the same direction as the output area    if (("frame" in client.currentObject) &&        client.currentObject.frame &&        ("contentDocument" in client.currentObject.frame) &&        client.currentObject.frame.contentDocument &&        ("body" in client.currentObject.frame.contentDocument) &&        client.currentObject.frame.contentDocument.body)    {        var contentArea = client.currentObject.frame.contentDocument.body;        client.input.setAttribute("dir", contentArea.getAttribute("dir"));    }    client.input.focus();}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/b7e3890899043c50cc9416261ebb60084772c5c7/static.js/buggy/extensions/irc/xul/content/static.js