updates.
[silc.git] / apps / irssi / src / silc / core / client_ops.c
index e8386ac52055329107581b5fd1db608119811881..eac8f1c0b71b72c910b654befaa9fa31e8aa932a 100644 (file)
@@ -557,11 +557,17 @@ silc_command_reply(SilcClient client, SilcClientConnection conn,
     break;
     
   case SILC_COMMAND_OPER:
+    if (!success)
+      return;
+
     printformat_module("fe-common/silc", server, NULL,
                       MSGLEVEL_CRAP, SILCTXT_SERVER_OPER);
     break;
     
   case SILC_COMMAND_SILCOPER:
+    if (!success)
+      return;
+
     printformat_module("fe-common/silc", server, NULL,
                       MSGLEVEL_CRAP, SILCTXT_ROUTER_OPER);
     break;
@@ -671,6 +677,7 @@ silc_command_reply(SilcClient client, SilcClientConnection conn,
       }
     }
     break;
+
   }
 
   va_end(vp);
@@ -929,6 +936,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 */
@@ -937,7 +946,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