More work on the ADC client lib.

This commit is contained in:
Jan Vidar Krey
2009-10-06 12:39:31 +02:00
parent 8592aa80d4
commit 310ddf4e9d
3 changed files with 33 additions and 4 deletions

View File

@@ -230,7 +230,25 @@ static void ADC_client_on_recv_line(struct ADC_client* client, const char* line,
}
else
{
client->callback(client, ADC_CLIENT_USER_JOIN, 0);
if (adc_msg_has_named_argument(msg, "ID"))
{
struct ADC_user user;
EXTRACT_NAMED_ARG(msg, "NI", user.name);
EXTRACT_NAMED_ARG(msg, "DE", user.description);
EXTRACT_NAMED_ARG(msg, "VE", user.version);
EXTRACT_NAMED_ARG(msg, "ID", user.cid);
EXTRACT_NAMED_ARG(msg, "I4", user.address);
struct ADC_client_callback_data data;
data.user = &user;
client->callback(client, ADC_CLIENT_USER_JOIN, &data);
hub_free(user.name);
hub_free(user.description);
hub_free(user.version);
hub_free(user.cid);
hub_free(user.address);
}
}
}