Moved idle event handling to the server.