git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/branches/u2_10_12_branch@1811
c9e4aea6-c8fd-4c43-8297-
357d70d61c8c
+2007-05-20 Michael Poole <mdpoole@troilus.org>
+
+ * ircd/m_burst.c (netride_modes): Return -1 if someone tries to
+ remove modes in the burst.
+ (ms_burst): Check for, and handle, that protocol violation.
+
2007-05-20 Michael Poole <mdpoole@troilus.org>
* ircd/m_privs.c (mo_privs): Report "no such nickname" for unknown
assert(modes && modes[0] == '+');
while (*modes) {
switch (*modes++) {
+ case '-':
+ return -1;
case 'i':
result |= MODE_INVITEONLY;
break;
if (parv[param][0] != '+')
continue;
check_modes = netride_modes(parc - param, parv + param, chptr->mode.key);
- if (check_modes)
+ if (check_modes < 0)
+ {
+ if (chptr->users == 0)
+ sub1_from_channel(chptr);
+ return protocol_violation(sptr, "Invalid mode string in BURST");
+ }
+ else if (check_modes)
{
/* Clear any outstanding rogue invites */
mode_invite_clear(chptr);