Fix the 'mode changes appear multiple times' bug.

This commit is contained in:
B.Greenham 2010-03-05 18:49:57 -05:00
parent 5e09b8c741
commit 2f39232fab
1 changed files with 5 additions and 3 deletions

View File

@ -2108,6 +2108,7 @@ set_channel_mode(struct Client *client_p, struct Client *source_p,
for(i = 0; i < mode_count; i++)
{
if(mode_changes[i].letter == 0 || mode_changes[i].mems != flags)
continue;
if(mode_changes[i].override != override)
continue;
@ -2193,6 +2194,7 @@ set_channel_mode(struct Client *client_p, struct Client *source_p,
msptr->flags &= ~CHFL_CHANOP;
}
}
/* only propagate modes originating locally, or if we're hubbing */
if(MyClient(source_p) || rb_dlink_list_length(&serv_list) > 1)
send_cap_mode_changes(client_p, source_p, chptr, mode_changes, mode_count);