/*************************************************************************************************************
This file contains broadcasting buddis statuses
2012/6 by Dlxko
**************************************************************************************************************/
#include "BroadBuddies.h"

static int j;
/*************************** BROADCAST BUDDIES *****************************/
void function_broadcast_buddies ( char *message, _client *current_client, int size)
{
	// Check all informations to prevent sending trash
	j = 0;
	do
	{
		if (function_check_client(&client[j]) && (&client[j].socket != &current_client->socket) && (function_check_friendstate(current_client, &client[j])))
		{
			// Send contacts
			function_send_data ( &client[j], message, size );
		}
		++j;
	}
	while ( j < MAX_CLIENTS);
}