Server Redirect if full

So what I’m wondering, is lets say I’m running two garrys mod servers.

Server #1 is full, but server #2 isn’t, is there a way to make it when you try to connect to server #1 it automatically redirects you to server #2?

When a player spawns, check if the server is at full capacity. If yes run connect <other IP> on them?

Seems like it would be a major cause of confusion and frustration especially for people with slower computers.

@Flap

This would require me to reserve 1 slot so that they could actually spawn though, i’m talking about when it’s maxed 64/64 and you can’t even get into the loading screen.

Best way I can think of it is using the CheckPassword hook and kicking them with reason : ‘Server Full, goto IP: 123.123.123.123’.

CheckPassword runs before player get kicked from fullslot? I mean, if you press on a server this open the generic server dialog with Auto-Join option

[editline]19th November 2014[/editline]

And not, you can’t since players on CheckPassword aren’t objects, so you can’t call them or run functions

All my servers are 100+ slots but set to max visible slots of 64 for example, so even at 64/64 it’s full. But either was you do it they’re going to have to see it as 63/64 otherwise the steam client won’t let them start joining (Ignoring console connect commands etc, we’re targeting the majority of users here not the smarter few).

Pretty sure there was a module that allowed you to change the visible slots while the server’s running. Just increase the slot count by one when the server is “full” and redirect them when they spawn. This means your visible limit has to be lower than the physical slot limit though.

Pretty sure this is the module I’m thinking of.

sv_visiblemaxplayers

Not a module, tis as guigui said. Just an ancient cvar used by all with wisdom or lazyness.