static void
silc_connected(SilcClient client, SilcClientConnection conn,
- SilcClientConnectionStatus status, const char *message,
+ SilcClientConnectionStatus status,
+ SilcStatus error, const char *message,
void *context)
{
MyBot mybot = client->application;
return 1;
}
- /* Now fill the allocated client with mandatory parameters the library
- requires: username, hostname and "real name". */
- mybot->client->username = silc_get_username();
- mybot->client->hostname = silc_net_localhost();
- mybot->client->realname = strdup("I am the MyBot");
-
/* Now we initialize the client. */
- if (!silc_client_init(mybot->client)) {
+ if (!silc_client_init(mybot->client, silc_get_username(),
+ silc_net_localhost(), "I am the MyBot")) {
perror("Could not init client");
return 1;
}
silc_client_perform_key_agreement). If TRUE is returned also the
`completion' and `context' arguments must be set by the application. */
-static bool
+static void
silc_key_agreement(SilcClient client, SilcClientConnection conn,
SilcClientEntry client_entry, const char *hostname,
- SilcUInt16 port, SilcKeyAgreementCallback *completion,
- void **context)
+ SilcUInt16 port)
{
/* MyBot does not support incoming key agreement protocols, it's too
simple for that. */