RTBCC_Socket.getUserInfo(%BLID);
And
RTBCC_Socket::onPlayerInfoResponse(%this,%parser,%packet)
{
...
%name = %packet.find("server/name").cData;
Snippet from connectClient.cs, lines 3377 and 1949-2088 respectively.
EDIT: It will only work if the target user has 'let anyone see the server i'm on' enabled, if that's off the only way to get it would be through hacking.