Modified websocket server script.