SILC_OPER_STATS_UPDATE(client, server, SILC_UMODE_SERVER_OPERATOR);
SILC_OPER_STATS_UPDATE(client, router, SILC_UMODE_ROUTER_OPERATOR);
- if (client->data.public_key)
- silc_hash_table_del_by_context(server->pk_hash,
- client->data.public_key,
- client);
+ /* Remove client's public key from repository, this will free it too. */
+ if (client->data.public_key) {
+ silc_skr_del_public_key(server->repository, client->data.public_key,
+ client);
+ client->data.public_key = NULL;
+ }
+
silc_server_remove_clients_channels(server, entry, clients,
client, channels);
silc_server_del_from_watcher_list(server, client);
client->mode = 0;
client->router = NULL;
client->connection = NULL;
+ silc_dlist_add(server->expired_clients, client);
} else {
silc_idlist_del_data(client);
silc_idlist_del_client(server->local_list, client);
SILC_OPER_STATS_UPDATE(client, server, SILC_UMODE_SERVER_OPERATOR);
SILC_OPER_STATS_UPDATE(client, router, SILC_UMODE_ROUTER_OPERATOR);
- if (client->data.public_key)
- silc_hash_table_del_by_context(server->pk_hash,
- client->data.public_key,
- client);
+ /* Remove client's public key from repository, this will free it too. */
+ if (client->data.public_key) {
+ silc_skr_del_public_key(server->repository, client->data.public_key,
+ client);
+ client->data.public_key = NULL;
+ }
+
silc_server_remove_clients_channels(server, entry, clients,
client, channels);
silc_server_del_from_watcher_list(server, client);
client->mode = 0;
client->router = NULL;
client->connection = NULL;
+ silc_dlist_add(server->expired_clients, client);
} else {
silc_idlist_del_data(client);
silc_idlist_del_client(server->global_list, client);
silc_skr_find_free(find);
}
-/* Get public key. For public key tables that has multiple keys in it the
- silc_server_find_public_key must be used. */
+/* Get public key by key usage and key context. */
SilcPublicKey silc_server_get_public_key(SilcServer server,
SilcSKRKeyUsage usage,
of the checks fails FALSE is returned. */
SilcBool silc_server_check_cmode_rights(SilcServer server,
- SilcChannelEntry channel,
- SilcChannelClientEntry client,
- SilcUInt32 mode)
+ SilcChannelEntry channel,
+ SilcChannelClientEntry client,
+ SilcUInt32 mode)
{
SilcBool is_op = client->mode & SILC_CHANNEL_UMODE_CHANOP;
SilcBool is_fo = client->mode & SILC_CHANNEL_UMODE_CHANFO;
SILC_OPER_STATS_UPDATE(remote_client, server, SILC_UMODE_SERVER_OPERATOR);
SILC_OPER_STATS_UPDATE(remote_client, router, SILC_UMODE_ROUTER_OPERATOR);
- if (remote_client->data.public_key)
- silc_hash_table_del_by_context(server->pk_hash,
- remote_client->data.public_key,
- remote_client);
+ /* Remove client's public key from repository, this will free it too. */
+ if (remote_client->data.public_key) {
+ silc_skr_del_public_key(server->repository,
+ remote_client->data.public_key, remote_client);
+ remote_client->data.public_key = NULL;
+ }
if (SILC_IS_LOCAL(remote_client)) {
server->stat.my_clients--;
notify change of notify type indicated by `notify'. */
SilcBool silc_server_check_watcher_list(SilcServer server,
- SilcClientEntry client,
- const char *new_nick,
- SilcNotifyType notify)
+ SilcClientEntry client,
+ const char *new_nick,
+ SilcNotifyType notify)
{
unsigned char hash[16];
WatcherNotifyContext n;
is not watching any nicknames. */
SilcBool silc_server_del_from_watcher_list(SilcServer server,
- SilcClientEntry client)
+ SilcClientEntry client)
{
SilcHashTableList htl;
void *key;
/* Process invite or ban information */
-SilcBool silc_server_inviteban_process(SilcServer server, SilcHashTable list,
- SilcUInt8 action, SilcArgumentPayload args)
+SilcBool silc_server_inviteban_process(SilcServer server,
+ SilcHashTable list,
+ SilcUInt8 action,
+ SilcArgumentPayload args)
{
unsigned char *tmp;
SilcUInt32 type, len;
on the `channel' public key list. */
SilcBool silc_server_verify_channel_auth(SilcServer server,
- SilcChannelEntry channel,
- SilcClientID *client_id,
- const unsigned char *auth,
- SilcUInt32 auth_len)
+ SilcChannelEntry channel,
+ SilcClientID *client_id,
+ const unsigned char *auth,
+ SilcUInt32 auth_len)
{
SilcAuthPayload ap;
SilcPublicKey chpk;