ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/branches/8.2.x/src/channel_mode.c
(Generate patch)

Comparing ircd-hybrid/branches/8.2.x/src/channel_mode.c (file contents):
Revision 8438 by michael, Thu Mar 29 13:05:42 2018 UTC vs.
Revision 8446 by michael, Fri Mar 30 11:36:06 2018 UTC

# Line 473 | Line 473 | chm_ban(struct Client *source_p, struct
473  
474    if (dir == MODE_ADD)  /* setting + */
475    {
476 <    if (!add_id(source_p, chptr, mask, CHFL_BAN))
476 >    if (add_id(source_p, chptr, mask, CHFL_BAN) == 0)
477        return;
478    }
479    else if (dir == MODE_DEL)  /* setting - */
480    {
481 <    if (!del_id(chptr, mask, CHFL_BAN))
481 >    if (del_id(chptr, mask, CHFL_BAN) == 0)
482        return;
483    }
484  
# Line 542 | Line 542 | chm_except(struct Client *source_p, stru
542  
543    if (dir == MODE_ADD)  /* setting + */
544    {
545 <    if (!add_id(source_p, chptr, mask, CHFL_EXCEPTION))
545 >    if (add_id(source_p, chptr, mask, CHFL_EXCEPTION) == 0)
546        return;
547    }
548    else if (dir == MODE_DEL)  /* setting - */
549    {
550 <    if (!del_id(chptr, mask, CHFL_EXCEPTION))
550 >    if (del_id(chptr, mask, CHFL_EXCEPTION) == 0)
551        return;
552    }
553  
# Line 611 | Line 611 | chm_invex(struct Client *source_p, struc
611  
612    if (dir == MODE_ADD)  /* setting + */
613    {
614 <    if (!add_id(source_p, chptr, mask, CHFL_INVEX))
614 >    if (add_id(source_p, chptr, mask, CHFL_INVEX) == 0)
615        return;
616    }
617    else if (dir == MODE_DEL)  /* setting - */
618    {
619 <    if (!del_id(chptr, mask, CHFL_INVEX))
619 >    if (del_id(chptr, mask, CHFL_INVEX) == 0)
620        return;
621    }
622  
# Line 675 | Line 675 | chm_voice(struct Client *source_p, struc
675    }
676    else if (dir == MODE_DEL)  /* setting - */
677    {
678 <    if (!has_member_flags(member, CHFL_VOICE))
678 >    if (has_member_flags(member, CHFL_VOICE) == 0)
679        return;  /* No redundant mode changes */
680  
681      DelMemberFlag(member, CHFL_VOICE);
# Line 733 | Line 733 | chm_hop(struct Client *source_p, struct
733    }
734    else if (dir == MODE_DEL)  /* setting - */
735    {
736 <    if (!has_member_flags(member, CHFL_HALFOP))
736 >    if (has_member_flags(member, CHFL_HALFOP) == 0)
737        return;  /* No redundant mode changes */
738  
739      DelMemberFlag(member, CHFL_HALFOP);
# Line 791 | Line 791 | chm_op(struct Client *source_p, struct C
791    }
792    else if (dir == MODE_DEL)  /* setting - */
793    {
794 <    if (!has_member_flags(member, CHFL_CHANOP))
794 >    if (has_member_flags(member, CHFL_CHANOP) == 0)
795        return;  /* No redundant mode changes */
796  
797      DelMemberFlag(member, CHFL_CHANOP);
# Line 846 | Line 846 | chm_limit(struct Client *source_p, struc
846    }
847    else if (dir == MODE_DEL)
848    {
849 <    if (!chptr->mode.limit)
849 >    if (chptr->mode.limit == 0)
850        return;
851  
852      chptr->mode.limit = 0;
# Line 1203 | Line 1203 | channel_mode_set(struct Client *source_p
1203    }
1204  
1205    /* Bail out if we have nothing to do... */
1206 <  if (!mode_count)
1206 >  if (mode_count == 0)
1207      return;
1208  
1209    send_mode_changes_client(source_p, chptr);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines