• Andrew Price's avatar
    Give onoff mwjs objects a timestamp · 3d5db0e9
    Andrew Price authored
    function handler(ev)
    {
    	switch (ev.type) {
            case "mw_logon":
            case "mw_logoff":
            case "talker_join":
            case "talker_leave":
                    onoff = ev.data;
    		t = new Date(onoff.unixtime * 1000);
    		mw.print("onoff event at: " + t);
    		break;
    	}
    	return true;
    }
    mw.onevent.push(handler);
    3d5db0e9