Code:
void SV_RejectConnection(netadr_t *adr, char *fmt, ...)
int SV_FindEmptySlot(netadr_t *adr, int *pslot, client_t **ppClient)
{
client_t *client;
int slot;
int clients = 0;
for (slot = 0 ; slot < svs.maxclients ; slot++)
{
client = &svs.clients[slot];
if (!client->active && !client->spawned && !client->connected)
break;
clients++;
}
if (clients >= svs.maxclients)
{
SV_RejectConnection(adr, "Server is full.\n");
return 0;
}
*pslot = slot;
*ppClient = client;
return 1;
}
in win32 hw.dll build 6153
68 ?? ?? ?? ?? push offset aServerIsFull_ ; "Server is full.\n"
51 push ecx ; adr
E8 ?? ?? ?? ?? call SV_RejectConnection
83 C4 08 add esp, 8
just alt+t search "Server is full.\n" and
find SV_RejectConnection then hook this function, return g_pfn_SV_RejectConnection(adr, "a new \"server is full\"! "); when necessary.