From e26c0a51dea5e5ade3bdf081f29500a0fe3944d3 Mon Sep 17 00:00:00 2001 From: Bryan Worth Date: Fri, 25 Nov 2005 18:04:24 +0000 Subject: [PATCH] 2005-11-25 Bryan Worth * TODO: checked off NOTICE USER and NOTICE QUIT *src/ttt-client.c: (_ttt_client_execute_helo): implement NOTICE USER *(_ttt_client_execute_quit): implement NOTICE QUIT --- ChangeLog | 5 +++++ TODO | 4 ++-- src/ttt-client.c | 9 ++++++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index e08c526..f99f646 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-11-25 Bryan Worth + * TODO: checked off NOTICE USER and NOTICE QUIT + *src/ttt-client.c: (_ttt_client_execute_helo): implement NOTICE USER + *(_ttt_client_execute_quit): implement NOTICE QUIT + 2005-11-25 Bryan Worth * TODO: checked off MESSAGE diff --git a/TODO b/TODO index a795a03..da77894 100644 --- a/TODO +++ b/TODO @@ -18,8 +18,8 @@ S C 1.4.3. MOVE 2. Asynchronous notification. 2.1. Global notices - 2.1.1. NOTICE USER - 2.1.2. NOTICE QUIT +✓ 2.1.1. NOTICE USER +✓ 2.1.2. NOTICE QUIT 2.1.3. NOTICE INVITE 2.1.4. NOTICE DISPOSE 2.1.5. NOTICE MESSAGE diff --git a/src/ttt-client.c b/src/ttt-client.c index 53cc4ff..7b37fad 100644 --- a/src/ttt-client.c +++ b/src/ttt-client.c @@ -109,6 +109,9 @@ _ttt_client_execute_helo (ttt_client_t *client, ttt_client_send (client, response); + xasprintf (&response, "NOTICE USER %s\n",client->name); + ttt_server_broadcast(client->server,response); + free (response); return TTT_ERROR_NONE; @@ -137,8 +140,12 @@ _ttt_client_execute_quit (ttt_client_t *client, char **args, int num_args) { - assert (num_args == 0); + char *notice; + assert (num_args == 0); + xasprintf (¬ice,"NOTICE QUIT %s\n",client->name); + ttt_server_broadcast(client->server,notice); + free (notice); return TTT_ERROR_QUIT_REQUESTED; } -- 2.43.0