I started doing some testing with infected servers and investigating how it actually gets spreaded.
First of all, by joining the infected server, you don't get infected just by being in the lobby. You actually have to play inside of the server to get infected with it. Then the infected person will join another server.
After the infected person joins a server, the server will still not yet be infected. It's not until they hit "escape" that the hack is activated. Once the script is activated, everyone ingame will be infected with the hack. The server will also be infected with it, which will infect anyone else who joins. Only servers with the script active will spread it to the players. Infected players can not infect others.
So the infection doesn't spread until the script is actually activated, or has been activated on the server, which will then infect anyone who joins it. Then the infection can be gotten rid of by restarting the infected game client and the infected server.