X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=apps%2Fsilcd%2Fcommand_reply.c;h=ecf6f3c22ff8614c6801093b7cee17d2ed9cc8c6;hb=a312fb463ab0d4673f6666a8224765082c941005;hp=64ca3abaa2f346835581670ffc80f00322d5e4b6;hpb=ee4b4e3a8f48f051898c3f2511e15c1877609a33;p=silc.git diff --git a/apps/silcd/command_reply.c b/apps/silcd/command_reply.c index 64ca3aba..ecf6f3c2 100644 --- a/apps/silcd/command_reply.c +++ b/apps/silcd/command_reply.c @@ -401,6 +401,17 @@ silc_server_command_reply_whowas_save(SilcServerCommandReplyContext cmd) client, 0, NULL); } + /* If client is global and is not on any channel then add that we'll + expire the entry after a while. */ + if (global) { + silc_idlist_find_client_by_id(server->global_list, client->id, + FALSE, &cache); + if (!silc_hash_table_count(client->channels)) + cache->expire = SILC_ID_CACHE_EXPIRE_DEF; + else + cache->expire = 0; + } + silc_free(client_id); return TRUE;