diff --git a/src/prot.c b/src/prot.c index b1ac6d5..0325106 100644 --- a/src/prot.c +++ b/src/prot.c @@ -278,7 +278,6 @@ void update_modes(Chan *chan) */ int check_mass(Chan *chan, ChanUser *doer, int type) { - time_t when; int num,limit; /* @@ -388,6 +387,9 @@ void prot_action(Chan *chan, char *from, ChanUser *doer, char *target, ChanUser uprot = get_protaction(chan,target); } + /* dont enforce protection levels higher than channel is set to */ + if (maxprot < uprot) uprot = maxprot; + if ((uprot >= 4) && (!(doer->flags & CU_BANNED))) { doer->flags |= CU_BANNED|CU_DEOPPED;