X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilcclient%2Fcommand_reply.c;h=2e194d9ffdc2ee1d59ef23a4836e7e605f151686;hb=da3a876c26b6d697ee6446ad81a8edfff1828cab;hp=735dcc9d9ad3c3a594c6d69e3033dd517d6af84d;hpb=346885ee9466a6f1d5ecc99a5401aa3043acf7c0;p=silc.git diff --git a/lib/silcclient/command_reply.c b/lib/silcclient/command_reply.c index 735dcc9d..2e194d9f 100644 --- a/lib/silcclient/command_reply.c +++ b/lib/silcclient/command_reply.c @@ -1398,6 +1398,26 @@ SILC_CLIENT_CMD_REPLY_FUNC(detach) silc_client_command_reply_free(cmd); } +SILC_CLIENT_CMD_REPLY_FUNC(watch) +{ + SilcClientCommandReplyContext cmd = (SilcClientCommandReplyContext)context; + SilcClientConnection conn = (SilcClientConnection)cmd->sock->user_data; + + if (cmd->error != SILC_STATUS_OK) { + SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR, + "%s", silc_client_status_message(cmd->error)); + COMMAND_REPLY_ERROR; + goto out; + } + + /* Notify application */ + COMMAND_REPLY((ARGS)); + + out: + SILC_CLIENT_PENDING_EXEC(cmd, SILC_COMMAND_WATCH); + silc_client_command_reply_free(cmd); +} + SILC_CLIENT_CMD_REPLY_FUNC(ban) { SilcClientCommandReplyContext cmd = (SilcClientCommandReplyContext)context;