updates.
[silc.git] / apps / irssi / src / silc / core / silc-servers.c
index 841b8411f23f7ad4408e62e6200e474273b44ebc..c0897f299cfe76ed5b91f8c9fc2ee605be81056d 100644 (file)
@@ -41,6 +41,8 @@
 #include "window-item-def.h"
 
 #include "fe-common/core/printtext.h"
+#include "fe-common/core/fe-channels.h"
+#include "fe-common/core/keyboard.h"
 #include "fe-common/silc/module-formats.h"
 
 #include "silc-commands.h"
@@ -214,6 +216,11 @@ static void sig_connected(SILC_SERVER_REC *server)
                                    server);
   server->conn = conn;
 
+  if (params.detach_data)
+    keyboard_entry_redirect(NULL,
+                           "-- Resuming old session, may take a while ...",
+                           ENTRY_REDIRECT_FLAG_HIDDEN, server);
+
   silc_free(params.detach_data);
   unlink(file);
 
@@ -340,8 +347,9 @@ char *silc_server_get_channels(SILC_SERVER_REC *server)
 /* SYNTAX: FILE RECEIVE [<nickname>] */
 /* SYNTAX: FILE CLOSE [<nickname>] */
 /* SYNTAX: FILE */
-/* SYNTAX: JOIN <channel> [<passphrase>] [-cipher <cipher>] [-hmac <hmac>] [-founder <-pubkey|passwd>] */
+/* SYNTAX: JOIN <channel> [<passphrase>] [-cipher <cipher>] [-hmac <hmac>] [-founder] */
 /* SYNTAX: DETACH */
+/* SYNTAX: WATCH [<-add | -del> <nickname>] */
 
 void silc_command_exec(SILC_SERVER_REC *server,
                       const char *command, const char *args)
@@ -715,7 +723,7 @@ static void command_file(const char *data, SILC_SERVER_REC *server,
       }
 
       ret = silc_client_file_receive(silc_client, conn, 
-                                    silc_client_file_monitor, server,
+                                    silc_client_file_monitor, server, NULL,
                                     server->current_session->session_id);
       if (ret != SILC_CLIENT_FILE_OK) {
        if (ret == SILC_CLIENT_FILE_ALREADY_STARTED)
@@ -736,7 +744,7 @@ static void command_file(const char *data, SILC_SERVER_REC *server,
       if (ftp->client_entry == client_entry && !ftp->filepath) {
        ret = silc_client_file_receive(silc_client, conn, 
                                       silc_client_file_monitor, server,
-                                      ftp->session_id);
+                                      NULL, ftp->session_id);
        if (ret != SILC_CLIENT_FILE_OK) {
          if (ret == SILC_CLIENT_FILE_ALREADY_STARTED)
            printformat_module("fe-common/silc", server, NULL,
@@ -892,6 +900,7 @@ void silc_server_init(void)
   command_bind_silc("sconnect", MODULE_NAME, (SIGNAL_FUNC) command_sconnect);
   command_bind_silc("file", MODULE_NAME, (SIGNAL_FUNC) command_file);
   command_bind_silc("detach", MODULE_NAME, (SIGNAL_FUNC) command_self);
+  command_bind_silc("watch", MODULE_NAME, (SIGNAL_FUNC) command_self);
 
   command_set_options("connect", "+silcnet");
 }
@@ -926,6 +935,7 @@ void silc_server_deinit(void)
   command_unbind("sconnect", (SIGNAL_FUNC) command_sconnect);
   command_unbind("file", (SIGNAL_FUNC) command_file);
   command_unbind("detach", (SIGNAL_FUNC) command_self);
+  command_unbind("watch", (SIGNAL_FUNC) command_self);
 }
 
 void silc_server_free_ftp(SILC_SERVER_REC *server,