From: Pekka Riikonen Date: Wed, 14 Feb 2001 14:42:01 +0000 (+0000) Subject: Invalidate the nickname when the replace_id packet was received X-Git-Tag: SILC.0.1~232 X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=commitdiff_plain;h=f36fff7c99c7aa5268593a53ab3b799e38f4b839 Invalidate the nickname when the replace_id packet was received and Client ID was changed. This way the server will query the nickname if someone (client) wants it later. --- diff --git a/apps/silcd/packet_receive.c b/apps/silcd/packet_receive.c index d8141e97..1ffa088e 100644 --- a/apps/silcd/packet_receive.c +++ b/apps/silcd/packet_receive.c @@ -364,6 +364,12 @@ void silc_server_replace_id(SilcServer server, oidp = silc_id_payload_encode(id, SILC_ID_CLIENT); nidp = silc_id_payload_encode(id2, SILC_ID_CLIENT); + /* The nickname is not valid anymore, set it NULL. This causes that + the nickname will be queried if someone wants to know it. */ + if (client->nickname) + silc_free(client->nickname); + client->nickname = NULL; + /* Send the NICK_CHANGE notify type to local clients on the channels this client is joined to. */ silc_server_send_notify_on_channels(server, client, diff --git a/apps/silcd/testi2.conf b/apps/silcd/testi2.conf index 984d93b2..11fea2da 100644 --- a/apps/silcd/testi2.conf +++ b/apps/silcd/testi2.conf @@ -12,14 +12,17 @@ sha1::64:20 #rsa::1024 #dss::1024 +[Identity] +nobody:nobody + [AdminInfo] Mun huone:Mun servo:Pekka Riikonen:priikone@poseidon.pspt.fi [ServerInfo] -lassi.kuo.fi.ssh.com:212.146.8.246:Kuopio, Finland:1334 +lassi.kuo.fi.ssh.com:10.2.1.7:Kuopio, Finland:1334 [ListenPort] -212.146.8.246:212.146.8.246:1334 +10.2.1.7:10.2.1.7:1334 [Logging] infologfile:silcd2.log:10000 @@ -40,10 +43,11 @@ errorlogfile:silcd2.log:10000 [AdminConnection] [ServerConnection] -212.146.8.246:passwd:priikone:1333:1:1 +10.2.1.7:passwd:priikone:1333:1:1 +10.2.1.7:passwd:priikone:1336:1:1 [RouterConnection] -212.146.8.246:passwd:priikone:1335:1:1:0 +10.2.1.7:passwd:priikone:1335:1:1:0 [DenyConnection] [RedirectClient]