Fix last commit.

This commit is contained in:
Jan Vidar Krey 2010-04-11 20:16:20 +02:00
parent b7e62b46cc
commit 51c5b6169c
1 changed files with 4 additions and 2 deletions

View File

@ -207,8 +207,10 @@ int hub_handle_support(struct hub_info* hub, struct hub_user* u, struct adc_mess
else else
{ {
/* disconnect user for using an obsolete client. */ /* disconnect user for using an obsolete client. */
struct adc_message* message = adc_msg_construct(ADC_CMD_IMSG, 6); char* tmp = adc_msg_escape(hub->config->msg_proto_obsolete_adc0);
adc_msg_add_argument(message, hub->config->msg_proto_obsolete_adc0); struct adc_message* message = adc_msg_construct(ADC_CMD_IMSG, 6 + strlen(tmp));
adc_msg_add_argument(message, tmp);
hub_free(tmp);
route_to_user(hub, u, message); route_to_user(hub, u, message);
adc_msg_free(message); adc_msg_free(message);
hub_disconnect_user(hub, u, quit_protocol_error); hub_disconnect_user(hub, u, quit_protocol_error);