rem: lastWhoCheckTime = new Date(); var checkNext = (lastWhoCheckChannel == null); 
add: function checkWho() { var checkNext = (net.lastWhoCheckChannel == null); for (var c in net.primServ.channels) { var chan = net.primServ.channels[c];  if (checkNext && chan.active && chan.getUsersLength() < client.prefs["autoAwayCap"]) { net.primServ.LIGHTWEIGHT_WHO = true; net.primServ.sendData("WHO " + chan.encodedName + "\n"); net.lastWhoCheckChannel = chan; net.lastWhoCheckTime = Date.now(); return; }  if (chan == net.lastWhoCheckChannel) checkNext = true; } if (net.lastWhoCheckChannel) { net.lastWhoCheckChannel = null; checkWho(); } }; 
context: function onWhoTimeout(){    lastWhoCheckTime = new Date();    var checkNext = (lastWhoCheckChannel == null);    for (var n in client.networks)    {        var net = client.networks[n];        if (net.isConnected())        {            for (var c in net.primServ.channels)            {                var chan = net.primServ.channels[c];                if (checkNext && chan.active &&                    chan.getUsersLength() < client.prefs["autoAwayCap"])                {                    net.primServ.LIGHTWEIGHT_WHO = true;                    net.primServ.sendData("WHO " + chan.encodedName + "\n");                    lastWhoCheckChannel = chan;                    return;                }                if (chan == lastWhoCheckChannel)                    checkNext = true;            }        }    }    if (lastWhoCheckChannel)    {        lastWhoCheckChannel = null;        onWhoTimeout();    }}
meta: 1622	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1622/10aa69085096eb4280c8c295b7cdc1bb75dbde1b/handlers.js/clean/xul/content/handlers.js