X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=apps%2Fsilcd%2Fcommand.c;h=f5c3824fa0fede2c7f7405a0d4e7427a1fcad8d7;hb=1d2558fef038d7c846c477ab7f63985eab4790b7;hp=12acc29cc35349c321f596fe58061cb9e86fd01e;hpb=6f749a031aa242a4e9473b8e121d6a2676ce1e0b;p=silc.git diff --git a/apps/silcd/command.c b/apps/silcd/command.c index 12acc29c..f5c3824f 100644 --- a/apps/silcd/command.c +++ b/apps/silcd/command.c @@ -4592,11 +4592,13 @@ SILC_SERVER_CMD_FUNC(ban) SILC_STR_END); silc_hash_table_list(channel->ban_list, &htl); while (silc_hash_table_get(&htl, (void *)&type, (void *)&tmp2)) - list = silc_argument_payload_encode_one(list, tmp2->data, silc_buffer_len(tmp2), - type); + list = silc_argument_payload_encode_one(list, tmp2->data, + silc_buffer_len(tmp2), type); silc_hash_table_list_reset(&htl); } + tmp_id = silc_argument_get_arg_type(cmd->args, 1, &id_len); + /* Send BAN notify type to local servers (but not clients) and to network. */ if (atype && tmp && len2) { @@ -4606,7 +4608,7 @@ SILC_SERVER_CMD_FUNC(ban) if (server->server_type == SILC_ROUTER) silc_server_send_notify_to_channel(server, NULL, channel, FALSE, FALSE, SILC_NOTIFY_TYPE_BAN, 3, - id, id_len, + tmp_id, id_len, atype, 1, tmp ? blist.data : NULL, tmp ? silc_buffer_len(&blist) : 0); @@ -4620,7 +4622,7 @@ SILC_SERVER_CMD_FUNC(ban) /* Send the reply back to the client */ silc_server_send_command_reply(server, cmd->sock, SILC_COMMAND_BAN, SILC_STATUS_OK, 0, ident, 2, - 2, id, id_len, + 2, tmp_id, id_len, 3, list ? list->data : NULL, list ? silc_buffer_len(list) : 0); silc_buffer_free(list);