updates.
authorPekka Riikonen <priikone@silcnet.org>
Fri, 1 Jun 2001 11:09:41 +0000 (11:09 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Fri, 1 Jun 2001 11:09:41 +0000 (11:09 +0000)
CHANGES
apps/irssi/src/fe-common/silc/module-formats.c
apps/irssi/src/fe-common/silc/module-formats.h
apps/irssi/src/silc/core/client_ops.c
lib/silcclient/client.c

diff --git a/CHANGES b/CHANGES
index 21aac1076a66937629734d94788ed5c839e04cde..aa26761d47a86ef13baf37260230ec7c40f13552 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -5,6 +5,10 @@ Fri Jun  1 10:28:09 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
        * Removed silc_client_packet_send_flush from the client library
          as it is not needed.  Affected file lib/silcclient/client.[ch].
 
+       * Added printing of message of unresolved authentication method
+         to the Irssi SILC client.  Added it to the module formats.
+         Removed the same message from the client library.
+
 Thu May 31 13:57:33 CEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
 
        * Added new distribution feature, DISTLABEL.  Every distribution
index 9e8ddfb043b69544b60c7930dca69a44fda5744e..70535e9286c4a3dbe7e4144206f800901147b009 100644 (file)
@@ -103,6 +103,7 @@ FORMAT_REC fecommon_silc_formats[] = {
        { "auth_failed", "Authentication failed", 0 },
        { "set_away", "You have meen marked as being away (away message: {hilight $0})", 1, { 0 } },
        { "unset_away", "You are no longer marked as being away", 0 },
+       { "auth_meth_unresolved", "Could not resolve authentication method to use, assume no authentication", 0 },
 
        { NULL, NULL, 0 }
 };
index b1de61713684b243e74501c9358dfc425c7fbd21..2a4a8a664a1b4e7eaee7405953418d7eedb0b5b0 100644 (file)
@@ -97,6 +97,8 @@ enum {
   SILCTXT_AUTH_FAILED,
   SILCTXT_SET_AWAY,
   SILCTXT_UNSET_AWAY,
+  SILCTXT_AUTH_METH_UNRESOLVED,
+
 };
 
 extern FORMAT_REC fecommon_silc_formats[];
index 430da6ae11761a76525059d626462a54cf1bd2b7..62ba8be93da166f5d66971d1934aa3b6b8879d4f 100644 (file)
@@ -930,6 +930,8 @@ int silc_get_auth_method(SilcClient client, SilcClientConnection conn,
                         unsigned char **auth_data,
                         uint32 *auth_data_len)
 {
+  bool ret = TRUE;
+  SILC_SERVER_REC *server = conn ? conn->context : NULL;
 
   /* XXX must resolve from configuration whether this connection has
      any specific authentication data */
@@ -938,7 +940,12 @@ int silc_get_auth_method(SilcClient client, SilcClientConnection conn,
   *auth_data = NULL;
   *auth_data_len = 0;
 
-  return TRUE;
+  if (ret == FALSE) {
+    printformat_module("fe-common/silc", server, NULL,
+                      MSGLEVEL_MODES, SILCTXT_AUTH_METH_UNRESOLVED);
+  }
+
+  return ret;
 }
 
 /* Notifies application that failure packet was received.  This is called
index f061327f89ce608be7ecdcf55bfd4a10fb088e4c..ac029e2bab2a54513312800e32d1116139d1c38e 100644 (file)
@@ -467,12 +467,8 @@ SILC_TASK_CALLBACK(silc_client_connect_to_server_second)
   if (!client->ops->get_auth_method(client, sock->user_data, sock->hostname,
                                    sock->port, &proto_ctx->auth_meth,
                                    &proto_ctx->auth_data, 
-                                   &proto_ctx->auth_data_len)) {
-    client->ops->say(client, ctx->sock->user_data, 
-                    "Could not resolve authentication method to use, "
-                    "assume no authentication");
+                                   &proto_ctx->auth_data_len))
     proto_ctx->auth_meth = SILC_AUTH_NONE;
-  }
 
   /* Free old protocol as it is finished now */
   silc_protocol_free(protocol);