SilcClientConnection conn = cmd->conn;
SilcClientEntry client_entry = NULL;
SilcChannelEntry channel;
SilcClientConnection conn = cmd->conn;
SilcClientEntry client_entry = NULL;
SilcChannelEntry channel;
+ if (invite) {
+ args = silc_buffer_alloc_size(2);
+ silc_buffer_format(args,
+ SILC_STR_UI_SHORT(1),
+ SILC_STR_END);
+ args = silc_argument_payload_encode_one(args, invite, strlen(invite), 1);
+ }
+
/* Send the command */
chidp = silc_id_payload_encode(channel->id, SILC_ID_CHANNEL);
if (client_entry) {
clidp = silc_id_payload_encode(client_entry->id, SILC_ID_CLIENT);
buffer = silc_command_payload_encode_va(SILC_COMMAND_INVITE,
/* Send the command */
chidp = silc_id_payload_encode(channel->id, SILC_ID_CHANNEL);
if (client_entry) {
clidp = silc_id_payload_encode(client_entry->id, SILC_ID_CLIENT);
buffer = silc_command_payload_encode_va(SILC_COMMAND_INVITE,
1, chidp->data, chidp->len,
2, clidp->data, clidp->len,
1, chidp->data, chidp->len,
2, clidp->data, clidp->len,
1, chidp->data, chidp->len,
1, chidp->data, chidp->len,
}
silc_client_packet_send(cmd->client, conn->sock, SILC_PACKET_COMMAND, NULL,
0, NULL, NULL, buffer->data, buffer->len, TRUE);
silc_buffer_free(buffer);
silc_buffer_free(chidp);
}
silc_client_packet_send(cmd->client, conn->sock, SILC_PACKET_COMMAND, NULL,
0, NULL, NULL, buffer->data, buffer->len, TRUE);
silc_buffer_free(buffer);
silc_buffer_free(chidp);
SilcClientCommandContext cmd = (SilcClientCommandContext)context;
SilcClientConnection conn = cmd->conn;
SilcChannelEntry channel;
SilcClientCommandContext cmd = (SilcClientCommandContext)context;
SilcClientConnection conn = cmd->conn;
SilcChannelEntry channel;
+ if (ban) {
+ args = silc_buffer_alloc_size(2);
+ silc_buffer_format(args,
+ SILC_STR_UI_SHORT(1),
+ SILC_STR_END);
+ args = silc_argument_payload_encode_one(args, ban, strlen(ban), 1);
+ }
+
chidp = silc_id_payload_encode(channel->id, SILC_ID_CHANNEL);
/* Send the command */
buffer = silc_command_payload_encode_va(SILC_COMMAND_BAN,
chidp = silc_id_payload_encode(channel->id, SILC_ID_CHANNEL);
/* Send the command */
buffer = silc_command_payload_encode_va(SILC_COMMAND_BAN,
1, chidp->data, chidp->len,
1, chidp->data, chidp->len,
- type, ban, ban ? strlen(ban) : 0);
+ 2, args ? action : NULL,
+ args ? 1 : 0,
+ 3, args ? args->data : NULL,
+ args ? args->len : 0);
silc_client_packet_send(cmd->client, conn->sock, SILC_PACKET_COMMAND, NULL,
0, NULL, NULL, buffer->data, buffer->len, TRUE);
silc_buffer_free(buffer);
silc_buffer_free(chidp);
silc_client_packet_send(cmd->client, conn->sock, SILC_PACKET_COMMAND, NULL,
0, NULL, NULL, buffer->data, buffer->len, TRUE);
silc_buffer_free(buffer);
silc_buffer_free(chidp);