Uhm, most games are now hosted by bots.
The script you are using just finds the player with the lowest ping. This is, in non-bot games, usually the host. However, the ping will be large if they are tabbed out or stalling.
Anyways, working off of hosts isn't normally done anymore. Games usually go for an admin slot now, that slot being "Red."