add rpc commands
Improvement of the disconnect rules