Add ping event handler