I think there's no way to prevent specific players from joining a game.
At best, you can:
1. If you use HostingBuddy, just can type !close in the lobby.
2. If you are self-hosting, you can limit the number of players who can join your game by dragging the bottom edge of the players list up.
Concerning your suggestion specifically, it makes sense as a use case to implement. But the player who keeps joining your game may just change the nickname and join again, so in practice there would be little value behind this feature. Especially considering the semi-decentralized nature of WormNET and the game.