X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilcclient%2Fcommand.c;fp=lib%2Fsilcclient%2Fcommand.c;h=080962a226b9ff62f9a155150ff1f3baca9af8d1;hb=af6a141a3e8147538523665c54ccb58389c032ae;hp=a5ba076ec23cb79c7132c29ef04ed93576303cfa;hpb=58ded41c4e52b3cac79eb3fdf2ecbcc7fafce054;p=silc.git diff --git a/lib/silcclient/command.c b/lib/silcclient/command.c index a5ba076e..080962a2 100644 --- a/lib/silcclient/command.c +++ b/lib/silcclient/command.c @@ -123,6 +123,32 @@ static void silc_client_command_resolve_continue(SilcClient client, SILC_FSM_CALL_CONTINUE(&cmd->thread); } +/* Dummy command callback. Nothing interesting to do here. Use this when + you just send command but don't care about reply. */ + +SilcBool silc_client_command_called_dummy(SilcClient client, + SilcClientConnection conn, + SilcCommand command, + SilcStatus status, + SilcStatus error, + void *context, + va_list ap) +{ + return FALSE; +} + +/* Dummy resolving callback. Nothing interesting to do here. Use this + when you just resolve entires but don't care about reply. */ + +void silc_client_command_resolve_dummy(SilcClient client, + SilcClientConnection conn, + SilcStatus status, + SilcDList clients, + void *context) +{ + /* Nothing */ +} + /* Register command to client */ static SilcBool @@ -2453,6 +2479,12 @@ SILC_FSM_STATE(silc_client_command_watch) silc_pkcs_public_key_free(pk); } + /* If watching by nickname, resolve all users with that nickname so that + we get their information immediately. */ + if (type == 2) + silc_client_get_clients(conn->client, conn, cmd->argv[2], NULL, + silc_client_command_resolve_dummy, NULL); + /* Send the commmand */ silc_client_command_send_va(conn, cmd, cmd->cmd, NULL, NULL, 2, 1, silc_buffer_datalen(conn->internal->