chmode: Use original string when removing a mask

This commit is contained in:
Matthew Martin 2022-06-27 21:09:35 -05:00 committed by Ed Kellett
parent 62f6351d90
commit c0d93064a6

View file

@ -927,7 +927,7 @@ chm_ban(struct Client *source_p, struct Channel *chptr,
if (removed && removed->forward)
removed_mask_pos += snprintf(buf + old_removed_mask_pos, sizeof(buf) - old_removed_mask_pos, "%s$%s", removed->banstr, removed->forward) + 1;
else
removed_mask_pos += rb_strlcpy(buf + old_removed_mask_pos, mask, sizeof(buf)) + 1;
removed_mask_pos += rb_strlcpy(buf + old_removed_mask_pos, removed ? removed->banstr : mask, sizeof(buf)) + 1;
if (removed)
{
free_ban(removed);