X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilcclient%2Fcommand.c;h=913530b2ba44cbfa56aa859763936964021b568f;hb=b1a49687af6bbac5dd64e3ff18650a9d1685e993;hp=fe1abaf0440b8f61d35b8e954f1420bfb1bac755;hpb=ae13c2505a3c2ea067af59abc822345dbe54a943;p=crypto.git diff --git a/lib/silcclient/command.c b/lib/silcclient/command.c index fe1abaf0..913530b2 100644 --- a/lib/silcclient/command.c +++ b/lib/silcclient/command.c @@ -355,37 +355,6 @@ SILC_CLIENT_CMD_FUNC(identify) silc_client_command_free(cmd); } -/* Pending callbcak that will be called after the NICK command was - replied by the server. This sets the nickname if there were no - errors. */ - -SILC_CLIENT_CMD_FUNC(nick_change) -{ - SilcClientCommandContext cmd = (SilcClientCommandContext)context; - SilcClientConnection conn = cmd->conn; - SilcClientCommandReplyContext reply = - (SilcClientCommandReplyContext)context2; - SilcStatus status; - - silc_command_get_status(reply->payload, &status, NULL); - if (status == SILC_STATUS_OK) { - /* Set the nickname */ - silc_idcache_del_by_context(conn->client_cache, conn->local_entry); - if (conn->nickname) - silc_free(conn->nickname); - conn->nickname = strdup(cmd->argv[1]); - conn->local_entry->nickname = conn->nickname; - silc_client_nickname_format(cmd->client, conn, conn->local_entry); - silc_idcache_add(conn->client_cache, strdup(cmd->argv[1]), - conn->local_entry->id, conn->local_entry, 0, NULL); - COMMAND(SILC_STATUS_OK); - } else { - COMMAND_ERROR(status); - } - - silc_client_command_free(cmd); -} - /* Command NICK. Shows current nickname/sets new nickname on current window. */ @@ -440,14 +409,6 @@ SILC_CLIENT_CMD_FUNC(nick) buffer->data, buffer->len, TRUE); silc_buffer_free(buffer); - /* Register pending callback that will actually set the new nickname - if there were no errors returned by the server. */ - silc_client_command_pending(conn, SILC_COMMAND_NICK, - cmd->conn->cmd_ident, - silc_client_command_nick_change, - silc_client_command_dup(cmd)); - cmd->pending = TRUE; - out: silc_client_command_free(cmd); }