rem: 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(); 
add: var period = net.prefs["autoAwayPeriod"];   var waited = Date.now() - net.lastWhoCheckTime + 5000; if (net.isConnected() && (period != 0) && (period * 60000 < waited)) 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: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/63671f0e2615d0631f02b1b3bf623079e10936a7/handlers.js/buggy/extensions/irc/xul/content/handlers.js