name = cmd->argv[1];
/* Get the Channel ID of the channel */
- if (silc_idcache_find_by_data_one(conn->channel_cache, name, &id_cache)) {
+ if (silc_idcache_find_by_name_one(conn->channel_cache, name, &id_cache)) {
channel = (SilcChannelEntry)id_cache->context;
idp = silc_id_payload_encode(id_cache->id, SILC_ID_CHANNEL);
}
}
/* Get the Channel ID of the channel */
- if (!silc_idcache_find_by_data_one(conn->channel_cache, name, &id_cache)) {
+ if (!silc_idcache_find_by_name_one(conn->channel_cache, name, &id_cache)) {
cmd->client->ops->say(cmd->client, conn, "You are not on that channel");
COMMAND_ERROR;
goto out;
/* Send the command */
buffer = silc_command_payload_encode_va(SILC_COMMAND_PING, 0, 1,
1, conn->remote_id_data,
- SILC_ID_SERVER_LEN);
+ silc_id_get_len(conn->remote_id,
+ SILC_ID_SERVER));
silc_client_packet_send(cmd->client, conn->sock, SILC_PACKET_COMMAND, NULL,
0, NULL, NULL, buffer->data, buffer->len, TRUE);
silc_buffer_free(buffer);
}
/* See if we have joined to the requested channel already */
- if (silc_idcache_find_by_data_one(conn->channel_cache, cmd->argv[1],
+ if (silc_idcache_find_by_name_one(conn->channel_cache, cmd->argv[1],
&id_cache)) {
cmd->client->ops->say(cmd->client, conn,
"You are talking to channel %s", cmd->argv[1]);
}
/* Get the Channel ID of the channel */
- if (!silc_idcache_find_by_data_one(conn->channel_cache, name, &id_cache)) {
+ if (!silc_idcache_find_by_name_one(conn->channel_cache, name, &id_cache)) {
cmd->client->ops->say(cmd->client, conn, "You are not on that channel");
COMMAND_ERROR;
goto out;
}
/* Get the Channel ID of the channel */
- if (!silc_idcache_find_by_data_one(conn->channel_cache, name, &id_cache)) {
+ if (!silc_idcache_find_by_name_one(conn->channel_cache, name, &id_cache)) {
cmd->client->ops->say(cmd->client, conn, "You are not on that channel");
COMMAND_ERROR;
goto out;
conn->current_channel = NULL;
- silc_idcache_del_by_id(conn->channel_cache, SILC_ID_CHANNEL, channel->id);
+ silc_idcache_del_by_id(conn->channel_cache, channel->id);
silc_free(channel->channel_name);
silc_free(channel->id);
silc_free(channel->key);
}
/* Get the Channel ID of the channel */
- if (!silc_idcache_find_by_data_one(conn->channel_cache, name, &id_cache)) {
+ if (!silc_idcache_find_by_name_one(conn->channel_cache, name, &id_cache)) {
/* XXX should resolve the channel ID; LIST command */
cmd->client->ops->say(cmd->client, conn,
"You are not on that channel", name);