Ejemplo n.º 1
0
bool chatbox::process_network_data(const ::config& data)
{
	if(const ::config& message = data.child("message")) {
		process_message(message);
	} else if(const ::config& whisper = data.child("whisper")) {
		process_message(whisper, true);
	} else if(const ::config& room_join = data.child("room_join")) {
		process_room_join(room_join);
	} else if(const ::config& room_part = data.child("room_part")) {
		process_room_part(room_part);
	} else if(const ::config& room_query_response = data.child("room_query_response")) {
		process_room_query_response(room_query_response);
	}

	return false;
}
Ejemplo n.º 2
0
bool tchatbox::process_network_data(const ::config& data)
{
	if(const ::config& c = data.child("message")) {
		process_message(c);
	} else if(const ::config& c = data.child("whisper")) {
		process_message(c, true);
	} else if(const ::config& c = data.child("room_join")) {
		process_room_join(c);
	} else if(const ::config& c = data.child("room_part")) {
		process_room_part(c);
	} else if(const ::config& c = data.child("room_query_response")) {
		process_room_query_response(c);
	}

	return false;
}
Ejemplo n.º 3
0
void tlobby_main::process_network_data(const config& data)
{
	if(const config& c = data.child("error")) {
		throw wesnothd_error(c["message"]);
	} else if(const config& c = data.child("message")) {
		process_message(c);
	} else if(const config& c = data.child("whisper")) {
		process_message(c, true);
	} else if(data.child("gamelist")) {
		process_gamelist(data);
	} else if(const config& c = data.child("gamelist_diff")) {
		process_gamelist_diff(c);
	} else if(const config& c = data.child("room_join")) {
		process_room_join(c);
	} else if(const config& c = data.child("room_part")) {
		process_room_part(c);
	} else if(const config& c = data.child("room_query_response")) {
		process_room_query_response(c);
	}
}