+Wed Nov 5 23:37:36 EET 2003 Pekka Riikonen <priikone@silcnet.org>
+
+ * Fixed UMODE setting in server when the client has anonymous
+ mode set. The mode setting was not working. Affected file
+ silcd/command.c.
+
Mon Nov 2 11:36:08 CET 2003 Jochen Eisinger <jochen@penguin-breeder.org>
* Fixed some bugs and typos related to sending split messages.
}
/* Anonymous mode cannot be set by client */
- if (mask & SILC_UMODE_ANONYMOUS) {
- if (!(client->mode & SILC_UMODE_ANONYMOUS)) {
- silc_server_command_send_status_reply(cmd, SILC_COMMAND_UMODE,
- SILC_STATUS_ERR_PERM_DENIED, 0);
- goto out;
- }
- } else {
- if (client->mode & SILC_UMODE_ANONYMOUS) {
- silc_server_command_send_status_reply(cmd, SILC_COMMAND_UMODE,
- SILC_STATUS_ERR_PERM_DENIED, 0);
- goto out;
- }
+ if (mask & SILC_UMODE_ANONYMOUS &&
+ !(client->mode & SILC_UMODE_ANONYMOUS)) {
+ silc_server_command_send_status_reply(cmd, SILC_COMMAND_UMODE,
+ SILC_STATUS_ERR_PERM_DENIED, 0);
+ goto out;
}
/* Update statistics */
server->stat.my_aways--;
}
+ /* If the client has anonymous mode set, preserve it. */
+ if (client->mode & SILC_UMODE_ANONYMOUS)
+ mask |= SILC_UMODE_ANONYMOUS;
+
/* Change the mode */
client->mode = mask;