MCPcopy Create free account
hub / github.com/JACoders/OpenJK / SV_FinalMessage

Function SV_FinalMessage

code/server/sv_init.cpp:429–440  ·  view source on GitHub ↗

================== SV_FinalMessage Used by SV_Shutdown to send a final message to all connected clients before the server goes down. The messages are sent immediately, not just stuck on the outgoing message list, because the server is going to totally exit after returning from this function. ================== */

Source from the content-addressed store, hash-verified

427==================
428*/
429void SV_FinalMessage( const char *message ) {
430 client_t *cl = svs.clients;
431
432 SV_SendServerCommand( NULL, "print \"%s\"", message );
433 SV_SendServerCommand( NULL, "disconnect" );
434
435 // send it twice, ignoring rate
436 if ( cl->state >= CS_CONNECTED ) {
437 SV_SendClientSnapshot( cl );
438 SV_SendClientSnapshot( cl );
439 }
440}
441
442
443/*

Callers 1

SV_ShutdownFunction · 0.70

Calls 2

SV_SendServerCommandFunction · 0.70
SV_SendClientSnapshotFunction · 0.70

Tested by

no test coverage detected