Enhancements to AWAY command.
authorPekka Riikonen <priikone@silcnet.org>
Wed, 19 Jul 2000 09:19:05 +0000 (09:19 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Wed, 19 Jul 2000 09:19:05 +0000 (09:19 +0000)
apps/silc/command.c
apps/silc/command_reply.c
apps/silc/screen.c
apps/silc/screen.h
apps/silcd/server_version.c
configure.in
includes/version.h

index f0d3e18139555f1c2b267d83fde6f4149255de7f..c64f44f932ed4719a1fc0be59b7130d1f76bccab 100644 (file)
@@ -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:
index df4d9a4309fb2b7bfa9abf71720b1ab7c0b5ad77..8d78b329df65c3a48931b1b88298ed24a892d372 100644 (file)
@@ -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);
 }
index e20756c5a33448170e4c726d8b85cd1c80272f6f..3cbae77e3592e8dc777afd9e90572cb43590dd70 100644 (file)
@@ -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++)
index 298419f7eb9190358d2e2e6bec06a3bfaa1070e6..6ea20b6482827d52547e5def22db5af8fe4d801d 100644 (file)
@@ -26,6 +26,7 @@ typedef struct {
   char *nickname;
   char *connection;
   char *channel;
+  int away;
 } *SilcScreenBottomLine;
 
 typedef struct {
index 5f3cd863b7c7afb794db8c347b32913b6cba9936..b80d2ec9f3ba90f1c04f5dc7003f1593284f4ea5 100644 (file)
@@ -20,4 +20,4 @@
 
 #include "serverincludes.h"
 
-const char server_version[] = "17072000";
+const char server_version[] = "19072000";
index b6442c5169786e7002c04e3f71f85bb5d1c98b5b..0a4727a38c22c84928ec2de8152fae6a68def909 100644 (file)
@@ -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))
 
 
index 8d70994c6693a47479a1afa76dff6282096b789e..1ba132b3dcb02de38f4c9f8b22e34031fee41008 100644 (file)
@@ -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";