Skip to content

Commit

Permalink
exttarget/chanacs: try to fix $chanacs: target
Browse files Browse the repository at this point in the history
  • Loading branch information
kaniini committed Feb 2, 2014
1 parent 31411f9 commit 240d16a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/exttarget/chanacs.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,18 @@ static chanacs_t *chanacs_ext_match_user(chanacs_t *ca, user_t *u)
{
chanacs_exttarget_t *ent;
mychan_t *mc;
unsigned int flags;

ent = (chanacs_exttarget_t *) ca->entity;

if (!(mc = mychan_find(ent->channel)))
return NULL;

if (chanacs_user_has_flag(mc, u, CA_AKICK))
flags = chanacs_user_flags(mc, u);
if (flags & CA_AKICK)
return NULL;

if (chanacs_user_has_flag(mc, u, 0))
if (flags)
return ca;

return NULL;
Expand Down

0 comments on commit 240d16a

Please sign in to comment.