3, tmp_mask, 4);
silc_server_packet_send(server, cmd->sock, SILC_PACKET_COMMAND_REPLY, 0,
packet->data, packet->len, FALSE);
-
+
silc_buffer_free(packet);
silc_buffer_free(cidp);
idp->data, idp->len);
silc_buffer_free(idp);
+ /* Send KICKED notify to primary route */
+ silc_server_send_notify_kicked(server, SILC_PRIMARY_ROUTE(server),
+ SILC_BROADCAST(server), channel,
+ target_client->id, client->id, comment);
+
/* Remove the client from the channel. If the channel does not exist
after removing the client then the client kicked itself off the channel
and we don't have to send anything after that. */
target_client, FALSE))
goto out;
- /* Send KICKED notify to primary route */
- silc_server_send_notify_kicked(server, SILC_PRIMARY_ROUTE(server),
- SILC_BROADCAST(server), channel,
- target_client->id, client->id, comment);
-
if (!(channel->mode & SILC_CHANNEL_MODE_PRIVKEY)) {
/* Re-generate channel key */
if (!silc_server_create_channel_key(server, channel, 0))
SILC_SERVER_COMMAND_CHECK(SILC_COMMAND_DETACH, cmd, 0, 0);
+ /* Remove operator privileges, since the client may resume in some
+ other server which to it does not have operator privileges. */
+ client->mode &= ~(SILC_UMODE_SERVER_OPERATOR |
+ SILC_UMODE_ROUTER_OPERATOR);
+
/* Send the user mode notify to notify that client is detached */
client->mode |= SILC_UMODE_DETACHED;
client->data.status &= ~SILC_IDLIST_STATUS_RESUMED;