Don't discard self-oppings from remote override opers.

There's a small chance this could be incorrect.

Also, the final set of override cleanups.
This commit is contained in:
JD Horelick 2010-03-03 15:34:57 -05:00
parent 565f4362f2
commit cb097b8840
2 changed files with 17 additions and 3 deletions

View File

@ -206,7 +206,7 @@ m_kick(struct Client *client_p, struct Client *source_p, int parc, const char *p
if(is_override) if(is_override)
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
"%s is overriding KICK [%s] on [%s] [%s]", "%s is overriding KICK [%s] on [%s] [%s]",
get_oper_name(source_p), who->name, chptr->chname, comment); get_oper_name(source_p), command, who->name, chptr->chname, comment);
/* jdc /* jdc
* - In the case of a server kicking a user (i.e. CLEARCHAN), * - In the case of a server kicking a user (i.e. CLEARCHAN),

View File

@ -783,7 +783,12 @@ chm_ban(struct Client *source_p, struct Channel *chptr,
mode_type != CHFL_QUIET) mode_type != CHFL_QUIET)
{ {
if(IsOverride(source_p)) if(IsOverride(source_p))
override = 1; {
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
"%s is overriding modes on %s: (%s list)",
get_oper_name(source_p), chptr->chname,
mode_type == CHFL_INVEX ? "invex" : "exempt");
}
else else
{ {
@ -967,8 +972,11 @@ chm_owner(struct Client *source_p, struct Channel *chptr,
if(targ_p == source_p) if(targ_p == source_p)
{ {
no_override_deop = 1; no_override_deop = 1;
/* Don't reject modes from remote. It desyncs, and this is perfectly
* legitimate from a remote override oper.
if(!override) if(!override)
return; return;
*/
} }
mode_changes[mode_count].letter = c; mode_changes[mode_count].letter = c;
@ -1068,8 +1076,11 @@ chm_op(struct Client *source_p, struct Channel *chptr,
if(targ_p == source_p) if(targ_p == source_p)
{ {
no_override_deop = 1; no_override_deop = 1;
/* Don't reject modes from remote. It desyncs, and this is perfectly
* legitimate from a remote override oper.
if(!override) if(!override)
return; return;
*/
} }
mode_changes[mode_count].letter = c; mode_changes[mode_count].letter = c;
@ -1178,8 +1189,11 @@ chm_halfop(struct Client *source_p, struct Channel *chptr,
if(targ_p == source_p) if(targ_p == source_p)
{ {
no_override_deop = 1; no_override_deop = 1;
/* Don't reject modes from remote. It desyncs, and this is perfectly
* legitimate from a remote override oper.
if(!override) if(!override)
return; return;
*/
} }
mode_changes[mode_count].letter = c; mode_changes[mode_count].letter = c;
@ -2052,7 +2066,7 @@ set_channel_mode(struct Client *client_p, struct Client *source_p,
source_p->name, source_p->username, source_p->name, source_p->username,
source_p->host, chptr->chname); source_p->host, chptr->chname);
for (override = 0; override < (IsOverride(source_p) ? 2 : 1); ++override) for (override = 0; override < (IsOverride(source_p) && alevel != CHFL_CHANOP ? 2 : 1); ++override)
{ {
int was_on_chan = 0; int was_on_chan = 0;