ph-ncurses connect callback leave