Source/ThunderBeast/QuakeToon/server/sv_main.c
void SV_FinalMessage (char *message, qboolean reconnect)
{
	int			i;
	client_t	*cl;
	
	SZ_Clear (&net_message);
	MSG_WriteByte (&net_message, svc_print);
	MSG_WriteByte (&net_message, PRINT_HIGH);
	MSG_WriteString (&net_message, message);

	if (reconnect)
		MSG_WriteByte (&net_message, svc_reconnect);
	else
		MSG_WriteByte (&net_message, svc_disconnect);

	// send it twice
	// stagger the packets to crutch operating system limited buffers

	for (i=0, cl = svs.clients ; i<maxclients->value ; i++, cl++)
		if (cl->state >= cs_connected)
			Netchan_Transmit (&cl->netchan, net_message.cursize
			, net_message.data);

	for (i=0, cl = svs.clients ; i<maxclients->value ; i++, cl++)
		if (cl->state >= cs_connected)
			Netchan_Transmit (&cl->netchan, net_message.cursize
			, net_message.data);
}
/*
==================
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.
==================
*/
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.
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 .
void SV_FinalMessage (char *message, qboolean reconnect)
{
	int			i;
	client_t	*cl;
	SZ_Clear (&net_message);
	MSG_WriteByte (&net_message, svc_print);
	MSG_WriteByte (&net_message, PRINT_HIGH);
	MSG_WriteString (&net_message, message);
	if (reconnect)
		MSG_WriteByte (&net_message, svc_reconnect);
	else
		MSG_WriteByte (&net_message, svc_disconnect);
	for (i=0, cl = svs.clients ; i<maxclients->value ; i++, cl++)
		if (cl->state >= cs_connected)
			Netchan_Transmit (&cl->netchan, net_message.cursize
			, net_message.data);
	for (i=0, cl = svs.clients ; i<maxclients->value ; i++, cl++)
		if (cl->state >= cs_connected)
			Netchan_Transmit (&cl->netchan, net_message.cursize
			, net_message.data);
}
void SV_FinalMessage ( char * message , qboolean reconnect ) { int i ; client_t * cl ; SZ_Clear ( & net_message ) ; MSG_WriteByte ( & net_message , svc_print ) ; MSG_WriteByte ( & net_message , PRINT_HIGH ) ; MSG_WriteString ( & net_message , message ) ; if ( reconnect ) MSG_WriteByte ( & net_message , svc_reconnect ) ; else MSG_WriteByte ( & net_message , svc_disconnect ) ; for ( i = 0 , cl = svs . clients ; i < maxclients -> value ; i ++ , cl ++ ) if ( cl -> state >= cs_connected ) Netchan_Transmit ( & cl -> netchan , net_message . cursize , net_message . data ) ; for ( i = 0 , cl = svs . clients ; i < maxclients -> value ; i ++ , cl ++ ) if ( cl -> state >= cs_connected ) Netchan_Transmit ( & cl -> netchan , net_message . cursize , net_message . data ) ; }
SV_FinalMessage
Used by SV_Shutdown to send a final message to all
connected clients before the server goes down.
SV_FinalMessage Used by SV_Shutdown to send a final message to all connected clients before the server goes down .
// send it twice // stagger the packets to crutch operating system limited buffers