

If server code is released such that people can run private servers after the official servers are shut down, then legally the people running the servers should be the ones liable for illegal activity that happens on them.
I could imagine third-party companies springing up whose entire business model is JUST providing unofficial servers for discontinued games and moderating them. Maybe a subscription service that provides access to servers for several different online service games.
Of course, it would be more likely that it would be just a player who hosts a server for themselves and their friends and doesn’t attempt to be profitable. That would be fine too.
This is why code should be written to be library-agnostic. Or, rather, libraries should be written to a particular open source interface standard to make library agnosticism easier.