Using server ID instead of server distance

Using server distance can fail sometimes (i don't know why, but the last decimals of the distance changed frecuently when i did my tests).
This change uses the server ID to verify if the #granted message is legit.