check_server() can return -1, so server_ok must be an int, not a bool
now that server_ok returns an int, must check the return value is greater than 0