logdate.js: function sendCTCP() { ctcp("day " + new Date().toString(), myNick); setNextTimer(); } function setNextTimer() { var now = new Date(); var next = new Date(now.getYear(), now.getMonth(), now.getDate() + 1); setTimeout(sendCTCP, next - now); } function event::onLoad() { setNextTimer(); }