SILC_GET16_MSB(status, silc_argument_get_arg_type(cmd->args, 1, NULL));
if (status != SILC_STATUS_OK) {
- cmd->client->ops->say(cmd->client, conn, "Cannot set nickname: %s",
+ cmd->client->ops->say(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
+ "Cannot set nickname: %s",
silc_client_command_status_message(status));
COMMAND_REPLY_ERROR;
goto out;
argc = silc_argument_get_arg_num(cmd->args);
if (argc < 2 || argc > 2) {
- cmd->client->ops->say(cmd->client, conn,
+ cmd->client->ops->say(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"Cannot set nickname: bad reply to command");
COMMAND_REPLY_ERROR;
goto out;
SILC_GET16_MSB(status, silc_argument_get_arg_type(cmd->args, 1, NULL));
if (status != SILC_STATUS_OK) {
- cmd->client->ops->say(cmd->client, conn,
+ cmd->client->ops->say(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"%s", silc_client_command_status_message(status));
COMMAND_REPLY_ERROR;
SILC_CLIENT_PENDING_DESTRUCTOR(cmd, SILC_COMMAND_TOPIC);
tmp = silc_argument_get_arg_type(cmd->args, 1, NULL);
SILC_GET16_MSB(status, tmp);
if (status != SILC_STATUS_OK) {
- cmd->client->ops->say(cmd->client, conn,
+ cmd->client->ops->say(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"%s", silc_client_command_status_message(status));
COMMAND_REPLY_ERROR;
SILC_CLIENT_PENDING_DESTRUCTOR(cmd, SILC_COMMAND_INVITE);
tmp = silc_argument_get_arg_type(cmd->args, 1, NULL);
SILC_GET16_MSB(status, tmp);
if (status != SILC_STATUS_OK) {
- cmd->client->ops->say(cmd->client, conn,
+ cmd->client->ops->say(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"%s", silc_client_command_status_message(status));
COMMAND_REPLY_ERROR;
goto out;
tmp = silc_argument_get_arg_type(cmd->args, 1, NULL);
SILC_GET16_MSB(status, tmp);
if (status != SILC_STATUS_OK) {
- cmd->client->ops->say(cmd->client, conn,
+ cmd->client->ops->say(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"%s", silc_client_command_status_message(status));
COMMAND_REPLY_ERROR;
SILC_CLIENT_PENDING_DESTRUCTOR(cmd, SILC_COMMAND_INFO);
if (!tmp)
goto out;
- client->ops->say(cmd->client, conn, "Info: %s", tmp);
+ client->ops->say(cmd->client, conn, SILC_CLIENT_MESSAGE_INFO,
+ "Info: %s", tmp);
/* Notify application */
COMMAND_REPLY((ARGS, NULL, (char *)tmp));
SILC_GET16_MSB(status, silc_argument_get_arg_type(cmd->args, 1, NULL));
if (status != SILC_STATUS_OK) {
- cmd->client->ops->say(cmd->client, conn,
+ cmd->client->ops->say(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"%s", silc_client_command_status_message(status));
COMMAND_REPLY_ERROR;
goto out;
for (i = 0; i < conn->ping_count; i++) {
if (SILC_ID_SERVER_COMPARE(conn->ping[i].dest_id, id)) {
diff = curtime - conn->ping[i].start_time;
- cmd->client->ops->say(cmd->client, conn,
+ cmd->client->ops->say(cmd->client, conn, SILC_CLIENT_MESSAGE_INFO,
"Ping reply from %s: %d second%s",
conn->ping[i].dest_name, diff,
diff == 1 ? "" : "s");
SILC_GET16_MSB(status, silc_argument_get_arg_type(cmd->args, 1, NULL));
if (status != SILC_STATUS_OK) {
- cmd->client->ops->say(cmd->client, conn,
+ cmd->client->ops->say(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"%s", silc_client_command_status_message(status));
COMMAND_REPLY_ERROR;
goto out;
argc = silc_argument_get_arg_num(cmd->args);
if (argc < 7 || argc > 14) {
- cmd->client->ops->say(cmd->client, conn,
+ cmd->client->ops->say(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"Cannot join channel: Bad reply packet");
COMMAND_REPLY_ERROR;
goto out;
/* Get channel name */
tmp = silc_argument_get_arg_type(cmd->args, 2, NULL);
if (!tmp) {
- cmd->client->ops->say(cmd->client, conn,
+ cmd->client->ops->say(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"Cannot join channel: Bad reply packet");
COMMAND_REPLY_ERROR;
goto out;
/* Get Channel ID */
tmp = silc_argument_get_arg_type(cmd->args, 3, &len);
if (!tmp) {
- cmd->client->ops->say(cmd->client, conn,
+ cmd->client->ops->say(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"Cannot join channel: Bad reply packet");
COMMAND_REPLY_ERROR;
silc_free(channel_name);
hmac = silc_argument_get_arg_type(cmd->args, 11, NULL);
if (hmac) {
if (!silc_hmac_alloc(hmac, NULL, &channel->hmac)) {
- cmd->client->ops->say(cmd->client, conn,
+ cmd->client->ops->say(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"Cannot join channel: Unsupported HMAC `%s'",
hmac);
COMMAND_REPLY_ERROR;
tmp = silc_argument_get_arg_type(cmd->args, 1, NULL);
SILC_GET16_MSB(status, tmp);
if (status != SILC_STATUS_OK) {
- cmd->client->ops->say(cmd->client, conn,
+ cmd->client->ops->say(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"%s", silc_client_command_status_message(status));
COMMAND_REPLY_ERROR;
return;
if (i == 2)
line[0] = ' ';
- cmd->client->ops->say(cmd->client, conn, "%s", line);
+ cmd->client->ops->say(cmd->client, conn, SILC_CLIENT_MESSAGE_INFO,
+ "%s", line);
if (!strlen(cp))
break;
tmp = silc_argument_get_arg_type(cmd->args, 1, NULL);
SILC_GET16_MSB(status, tmp);
if (status != SILC_STATUS_OK) {
- cmd->client->ops->say(cmd->client, conn,
+ cmd->client->ops->say(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"%s", silc_client_command_status_message(status));
COMMAND_REPLY_ERROR;
goto out;
SilcClientConnection conn = (SilcClientConnection)cmd->sock->user_data;
SilcCommandStatus status;
unsigned char *tmp;
+ uint32 mode;
SILC_GET16_MSB(status, silc_argument_get_arg_type(cmd->args, 1, NULL));
if (status != SILC_STATUS_OK) {
- cmd->client->ops->say(cmd->client, conn,
+ cmd->client->ops->say(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"%s", silc_client_command_status_message(status));
COMMAND_REPLY_ERROR;
goto out;
goto out;
}
+ SILC_GET32_MSB(mode, tmp);
+
/* Notify application */
- COMMAND_REPLY((ARGS, tmp));
+ COMMAND_REPLY((ARGS, mode));
/* Execute any pending command callbacks */
SILC_CLIENT_PENDING_EXEC(cmd, SILC_COMMAND_CMODE);
SilcIDCacheEntry id_cache = NULL;
SilcClientID *client_id;
unsigned char *tmp, *id;
- uint32 len;
+ uint32 len, mode;
SILC_GET16_MSB(status, silc_argument_get_arg_type(cmd->args, 1, NULL));
if (status != SILC_STATUS_OK) {
- cmd->client->ops->say(cmd->client, conn,
+ cmd->client->ops->say(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"%s", silc_client_command_status_message(status));
COMMAND_REPLY_ERROR;
goto out;
goto out;
}
+ SILC_GET32_MSB(mode, tmp);
+
/* Notify application */
- COMMAND_REPLY((ARGS, tmp, (SilcClientEntry)id_cache->context));
+ COMMAND_REPLY((ARGS, mode, (SilcClientEntry)id_cache->context));
silc_free(client_id);
/* Execute any pending command callbacks */
tmp = silc_argument_get_arg_type(cmd->args, 1, NULL);
SILC_GET16_MSB(status, tmp);
if (status != SILC_STATUS_OK) {
- cmd->client->ops->say(cmd->client, conn,
+ cmd->client->ops->say(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"%s", silc_client_command_status_message(status));
COMMAND_REPLY_ERROR;
goto out;
tmp = silc_argument_get_arg_type(cmd->args, 1, NULL);
SILC_GET16_MSB(status, tmp);
if (status != SILC_STATUS_OK) {
- cmd->client->ops->say(cmd->client, conn,
+ cmd->client->ops->say(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"%s", silc_client_command_status_message(status));
COMMAND_REPLY_ERROR;
goto out;
tmp = silc_argument_get_arg_type(cmd->args, 1, NULL);
SILC_GET16_MSB(status, tmp);
if (status != SILC_STATUS_OK) {
- cmd->client->ops->say(cmd->client, conn,
+ cmd->client->ops->say(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"%s", silc_client_command_status_message(status));
COMMAND_REPLY_ERROR;
goto out;
tmp = silc_argument_get_arg_type(cmd->args, 1, NULL);
SILC_GET16_MSB(status, tmp);
if (status != SILC_STATUS_OK) {
- cmd->client->ops->say(cmd->client, conn,
+ cmd->client->ops->say(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"%s", silc_client_command_status_message(status));
COMMAND_REPLY_ERROR;
goto out;
tmp = silc_argument_get_arg_type(cmd->args, 1, NULL);
SILC_GET16_MSB(status, tmp);
if (status != SILC_STATUS_OK) {
- cmd->client->ops->say(cmd->client, conn,
+ cmd->client->ops->say(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"%s", silc_client_command_status_message(status));
COMMAND_REPLY_ERROR;
goto out;
tmp = silc_argument_get_arg_type(cmd->args, 1, NULL);
SILC_GET16_MSB(status, tmp);
if (status != SILC_STATUS_OK) {
- cmd->client->ops->say(cmd->client, conn,
+ cmd->client->ops->say(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"%s", silc_client_command_status_message(status));
COMMAND_REPLY_ERROR;
goto out;
tmp = silc_argument_get_arg_type(cmd->args, 1, NULL);
SILC_GET16_MSB(status, tmp);
if (status != SILC_STATUS_OK) {
- cmd->client->ops->say(cmd->client, conn,
+ cmd->client->ops->say(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"%s", silc_client_command_status_message(status));
COMMAND_REPLY_ERROR;
goto out;
tmp = silc_argument_get_arg_type(cmd->args, 1, NULL);
SILC_GET16_MSB(status, tmp);
if (status != SILC_STATUS_OK) {
- cmd->client->ops->say(cmd->client, conn,
+ cmd->client->ops->say(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"%s", silc_client_command_status_message(status));
COMMAND_REPLY_ERROR;
goto out;
tmp = silc_argument_get_arg_type(cmd->args, 1, NULL);
SILC_GET16_MSB(status, tmp);
if (status != SILC_STATUS_OK) {
- cmd->client->ops->say(cmd->client, conn,
+ cmd->client->ops->say(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"%s", silc_client_command_status_message(status));
COMMAND_REPLY_ERROR;
goto out;
tmp = silc_argument_get_arg_type(cmd->args, 1, NULL);
SILC_GET16_MSB(status, tmp);
if (status != SILC_STATUS_OK) {
- cmd->client->ops->say(cmd->client, conn,
+ cmd->client->ops->say(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"%s", silc_client_command_status_message(status));
COMMAND_REPLY_ERROR;
goto out;