From: Pekka Riikonen Date: Wed, 19 Jul 2000 09:19:05 +0000 (+0000) Subject: Enhancements to AWAY command. X-Git-Tag: SILC.0.1~427 X-Git-Url: http://git.silcnet.org/gitweb/?a=commitdiff_plain;h=b0e6c9787c019eee7bc65150b5d67eb795fe5b54;p=silc.git Enhancements to AWAY command. --- diff --git a/apps/silc/command.c b/apps/silc/command.c index f0d3e181..c64f44f9 100644 --- a/apps/silc/command.c +++ b/apps/silc/command.c @@ -20,6 +20,9 @@ /* * $Id$ * $Log$ + * Revision 1.11 2000/07/19 09:19:05 priikone + * Enhancements to AWAY command. + * * Revision 1.10 2000/07/19 07:06:33 priikone * Added AWAY command. * @@ -910,8 +913,10 @@ SILC_CLIENT_CMD_FUNC(away) silc_free(win->away->away); silc_free(win->away); win->away = NULL; + client->screen->bottom_line->away = FALSE; silc_say(client, "Away message removed"); + silc_screen_print_bottom_line(cmd->client->screen, 0); } } else { @@ -920,9 +925,11 @@ SILC_CLIENT_CMD_FUNC(away) else win->away = silc_calloc(1, sizeof(*win->away)); + client->screen->bottom_line->away = TRUE; win->away->away = strdup(cmd->argv[1]); silc_say(client, "Away message set: %s", win->away->away); + silc_screen_print_bottom_line(cmd->client->screen, 0); } out: diff --git a/apps/silc/command_reply.c b/apps/silc/command_reply.c index df4d9a43..8d78b329 100644 --- a/apps/silc/command_reply.c +++ b/apps/silc/command_reply.c @@ -24,6 +24,9 @@ /* * $Id$ * $Log$ + * Revision 1.9 2000/07/19 09:19:05 priikone + * Enhancements to AWAY command. + * * Revision 1.8 2000/07/19 07:06:51 priikone * Added AWAY command. * @@ -787,6 +790,9 @@ SILC_CLIENT_CMD_REPLY_FUNC(msg) if (!remote_id) goto out; + if (!SILC_ID_CLIENT_COMPARE(remote_id, win->local_id)) + goto out; + /* Check whether we know this client already */ if (!silc_idcache_find_by_id_one(win->client_cache, remote_id, SILC_ID_CLIENT, &id_cache)) @@ -814,4 +820,5 @@ SILC_CLIENT_CMD_REPLY_FUNC(msg) out: memset(message, 0, buffer->len); silc_free(message); + silc_free(nickname); } diff --git a/apps/silc/screen.c b/apps/silc/screen.c index e20756c5..3cbae77e 100644 --- a/apps/silc/screen.c +++ b/apps/silc/screen.c @@ -26,6 +26,9 @@ /* * $Id$ * $Log$ + * Revision 1.5 2000/07/19 09:19:05 priikone + * Enhancements to AWAY command. + * * Revision 1.4 2000/07/10 05:38:08 priikone * Fixed screen refresh. * @@ -223,6 +226,9 @@ void silc_screen_print_bottom_line(SilcScreen screen, int win_index) SILC_SCREEN_MAX_CHANNEL_LEN : len); } + if (line->away) + strncat(buf, " (away)", 8); + wattrset(screen->output_stat_line[win_index], A_REVERSE); for (i = 0; i < COLS - 10; i++) diff --git a/apps/silc/screen.h b/apps/silc/screen.h index 298419f7..6ea20b64 100644 --- a/apps/silc/screen.h +++ b/apps/silc/screen.h @@ -26,6 +26,7 @@ typedef struct { char *nickname; char *connection; char *channel; + int away; } *SilcScreenBottomLine; typedef struct { diff --git a/apps/silcd/server_version.c b/apps/silcd/server_version.c index 5f3cd863..b80d2ec9 100644 --- a/apps/silcd/server_version.c +++ b/apps/silcd/server_version.c @@ -20,4 +20,4 @@ #include "serverincludes.h" -const char server_version[] = "17072000"; +const char server_version[] = "19072000"; diff --git a/configure.in b/configure.in index b6442c51..0a4727a3 100644 --- a/configure.in +++ b/configure.in @@ -33,7 +33,7 @@ case "$target" in ;; esac -AM_INIT_AUTOMAKE(silc, 17072000) +AM_INIT_AUTOMAKE(silc, 19072000) AC_PREREQ(2.3) AM_CONFIG_HEADER(includes/silcdefs.h) @@ -68,7 +68,7 @@ AC_HEADER_STAT AC_CHECK_HEADERS(unistd.h string.h getopt.h errno.h fcntl.h assert.h) AC_CHECK_HEADERS(sys/types.h sys/stat.h sys/time.h) AC_CHECK_HEADERS(netinet/in.h netinet/tcp.h netdb.h) -AC_CHECK_HEADERS(pwd.h grp.h termcap.h) +AC_CHECK_HEADERS(pwd.h grp.h termcap.h paths.h) AC_CHECK_HEADERS(ncurses.h signal.h ctype.h) AC_CHECK_HEADERS(arpa/inet.h sys/mman.h) @@ -114,9 +114,9 @@ AC_ARG_ENABLE(debug, ;; *) AC_MSG_RESULT(no) - CFLAGS="-O2 $CFLAGS" + CFLAGS="-O2 -g $CFLAGS" ;; -esac ], CFLAGS="-O2 $CFLAGS" +esac ], CFLAGS="-O2 -g $CFLAGS" AC_MSG_RESULT(no)) diff --git a/includes/version.h b/includes/version.h index 8d70994c..1ba132b3 100644 --- a/includes/version.h +++ b/includes/version.h @@ -33,8 +33,8 @@ typedef unsigned char SilcVersion; #define SILC_VERSION_1 '\1' /* SILC version string */ -const char *silc_version = "18072000"; -const char *silc_version_string = "SILC-1.0-18072000"; +const char *silc_version = "19072000"; +const char *silc_version_string = "SILC-1.0-19072000"; const char *silc_name = "SILC"; const char *silc_fullname = "Secure Internet Live Conferencing";