char **args,
int num_args);
+static ttt_error_t
+_ttt_client_execute_who (ttt_client_t *client,
+ char **args,
+ int num_args);
+
static ttt_error_t
_ttt_client_execute_quit (ttt_client_t *client,
char **args,
ttt_command_description_t command_descriptions[] = {
{"HELO", 1, _ttt_client_execute_helo},
+ {"WHO", 0, _ttt_client_execute_who},
{"QUIT", 0, _ttt_client_execute_quit}
};
#define ARRAY_SIZE(arr) (sizeof(arr)/sizeof(arr[0]))
return TTT_ERROR_NONE;
}
+static ttt_error_t
+_ttt_client_execute_who (ttt_client_t *client,
+ char **args,
+ int num_args)
+{
+ const char *response;
+
+ assert (num_args == 0);
+
+ response = ttt_server_who (client->server);
+
+ ttt_client_send (client, response);
+
+ free (response);
+
+ return TTT_ERROR_NONE;
+}
+
static ttt_error_t
_ttt_client_execute_quit (ttt_client_t *client,
char **args,