* Make mod_chanmode_dup() copy the limit and key like one might expect.
* Make ChanServ's handle_mode() copy the default modes using
mod_chanmode_dup() instead of an implicit memcpy.
git-archimport-id: srvx@srvx.net--2004-srvx/srvx--devo--1.3--patch-28
&& mode_lock_violated(&channel->channel_info->modes, change))
{
char correct[MAXLEN];
- bounce = mod_chanmode_alloc(change->argc + 1);
- *bounce = channel->channel_info->modes;
+ bounce = mod_chanmode_dup(&channel->channel_info->modes, change->argc + 1);
mod_chanmode_format(&channel->channel_info->modes, correct);
send_message(user, chanserv, "CSMSG_MODE_LOCKED", correct, channel->name);
}
if (res) {
res->modes_set = orig->modes_set;
res->modes_clear = orig->modes_clear;
+ res->new_limit = orig->new_limit;
+ memcpy(res->new_key, orig->new_key, sizeof(res->new_key));
res->argc = orig->argc;
memcpy(res->args, orig->args, orig->argc*sizeof(orig->args[0]));
}