Set user mode correctly to local entry in OPER/SILCOPER reply.
[crypto.git] / lib / silcclient / command_reply.c
index a4b9959202498134165c77fd56dcea423bd5e325..dd68d9ced409c98d23b3a67a913ea0b13d559237 100644 (file)
@@ -1623,6 +1623,9 @@ SILC_FSM_STATE(silc_client_command_reply_silcoper)
   CHECK_STATUS("Cannot change mode: ");
   CHECK_ARGS(1, 1);
 
+  /* Set user mode */
+  cmd->conn->local_entry->mode |= SILC_UMODE_ROUTER_OPERATOR;
+
   /* Notify application */
   silc_client_command_callback(cmd);
 
@@ -1642,6 +1645,9 @@ SILC_FSM_STATE(silc_client_command_reply_oper)
   CHECK_STATUS("Cannot change mode: ");
   CHECK_ARGS(1, 1);
 
+  /* Set user mode */
+  cmd->conn->local_entry->mode |= SILC_UMODE_SERVER_OPERATOR;
+
   /* Notify application */
   silc_client_command_callback(cmd);