in CMODE_CHANGE notify.
operation. Affected files are lib/silcclient/silcclient.h
and client_channel.c.
+ * Fixed wrong arg type for user limit in CMODE command reply.
+ Affected file silcd/command.c.
+
+ * The user limit is now taken and saved to SilcClientEntry in
+ JOIN and CMODE command replies and in CMODE_CHANGE notify.
+ Affected files lib/silcclient/silcclient.h, command_reply.c
+ and client_notify.c.
+
Fri Feb 27 11:25:26 CET 2004 Pekka Riikonen <priikone@silcnet.org>
* Fixed the JOIN command calling when called with both
SilcUInt32 channel_mode, int ignored, SilcBuffer key_payload, NULL, NULL,
char *topic, char *hmac_name, SilcUInt32 list_count, SilcBuffer client_id_list,
SilcBuffer client_mode_list, SilcPublicKey founder_key,
-SilcBuffer channel_pubkeys
+SilcBuffer channel_pubkeys, SilcUint32 user_limit
</td>
</tr>
Payload.
</td>
<td width="50%"><small>SilcChannelEntry channel, SilcUInt32 mode,
-SilcPublicKey founder_key, SilcBuffer channel_pubkeys
+SilcPublicKey founder_key, SilcBuffer channel_pubkeys,
+SilcUint32 user_limit
</td>
</tr>
founder_key = NULL;
}
+ /* Get user limit */
+ tmp = silc_argument_get_arg_type(args, 8, &tmp_len);
+ if (tmp && tmp_len == 4)
+ SILC_GET32_MSB(channel->user_limit, tmp);
+
/* Get the channel public key that was added or removed */
tmp = silc_argument_get_arg_type(args, 7, &tmp_len);
if (tmp)
silc_pkcs_public_key_payload_decode(tmp, len, &channel->founder_key);
}
+ /* Get user limit */
+ tmp = silc_argument_get_arg_type(cmd->args, 17, &len);
+ if (tmp && len == 4)
+ SILC_GET32_MSB(channel->user_limit, tmp);
+
/* Get channel public key list */
tmp = silc_argument_get_arg_type(cmd->args, 16, &len);
if (tmp)
keyp ? keyp->head : NULL, NULL,
NULL, topic, hmac, list_count, client_id_list,
client_mode_list, channel->founder_key,
- tmp ? &chpklist : NULL));
+ tmp ? &chpklist : NULL, channel->user_limit));
out:
SILC_CLIENT_PENDING_EXEC(cmd, SILC_COMMAND_JOIN);
public_key = NULL;
}
+ /* Get user limit */
+ tmp = silc_argument_get_arg_type(cmd->args, 6, &len);
+ if (tmp && len == 4)
+ SILC_GET32_MSB(channel->user_limit, tmp);
+
/* Get channel public key(s) */
tmp = silc_argument_get_arg_type(cmd->args, 5, &len);
if (tmp)
/* Notify application */
COMMAND_REPLY((SILC_ARGS, channel, mode, public_key,
- tmp ? &channel_pubkeys : NULL));
+ tmp ? &channel_pubkeys : NULL, channel->user_limit));
silc_free(channel_id);
SilcUInt32 mode; /* Channel mode, ChannelModes. */
char *topic; /* Current topic, may be NULL */
SilcPublicKey founder_key; /* Founder key, may be NULL */
+ SilcUInt32 user_limit; /* User limit on channel */
/* All clients that has joined this channel. The key to the table is the
SilcClientEntry and the context is SilcChannelUser context. */