silc_client_config_register_ciphers(app->config);
silc_client_config_register_pkcs(app->config);
silc_client_config_register_hashfuncs(app->config);
+ silc_client_config_register_hmacs(app->config);
/* Load public and private key */
if (silc_client_load_keys(silc) == FALSE)
static void silc_client_process_message(SilcClientInternal app)
{
unsigned char *data;
- unsigned int len;
+ uint32 len;
SILC_LOG_DEBUG(("Start"));
if (data[0] == '/' && data[1] != ' ') {
/* Command */
- unsigned int argc = 0;
+ uint32 argc = 0;
unsigned char **argv, *tmpcmd;
- unsigned int *argv_lens, *argv_types;
+ uint32 *argv_lens, *argv_types;
SilcClientCommand *cmd;
SilcClientCommandContext ctx;
/* Allocate command context. This and its internals must be free'd
by the command routine receiving it. */
- ctx = silc_calloc(1, sizeof(*ctx));
+ ctx = silc_client_command_alloc();
ctx->client = app->client;
ctx->conn = app->conn;
ctx->command = cmd;
if (len && app->conn && app->conn->current_channel &&
app->conn->current_channel->on_channel == TRUE) {
silc_print(app->client, "> %s", data);
- silc_client_packet_send_to_channel(app->client,
- app->conn->sock,
- app->conn->current_channel,
- data, strlen(data), TRUE);
+ silc_client_send_channel_message(app->client,
+ app->conn,
+ app->conn->current_channel, NULL,
+ 0, data, strlen(data), TRUE);
}
}
cs = app->config->commands;
while(cs) {
- unsigned int argc = 0;
+ uint32 argc = 0;
unsigned char **argv, *tmpcmd;
- unsigned int *argv_lens, *argv_types;
+ uint32 *argv_lens, *argv_types;
SilcClientCommand *cmd;
SilcClientCommandContext ctx;