/[svn]/ircd-hybrid/branches/8.2.x/src/channel_mode.c
ViewVC logotype

Diff of /ircd-hybrid/branches/8.2.x/src/channel_mode.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4882 by michael, Sun Nov 2 18:52:26 2014 UTC revision 4883 by michael, Tue Nov 18 16:22:18 2014 UTC
# Line 408  chm_simple(struct Client *source_p, stru Line 408  chm_simple(struct Client *source_p, stru
408        sendto_one_numeric(source_p, &me,        sendto_one_numeric(source_p, &me,
409                           alev == CHACCESS_NOTONCHAN ? ERR_NOTONCHANNEL :                           alev == CHACCESS_NOTONCHAN ? ERR_NOTONCHANNEL :
410                           ERR_CHANOPRIVSNEEDED, chptr->name);                           ERR_CHANOPRIVSNEEDED, chptr->name);
411    
412      *errors |= SM_ERR_NOOPS;      *errors |= SM_ERR_NOOPS;
413      return;      return;
414    }    }
# Line 458  chm_registered(struct Client *source_p, Line 459  chm_registered(struct Client *source_p,
459        sendto_one_numeric(source_p, &me,        sendto_one_numeric(source_p, &me,
460                           alev == CHACCESS_NOTONCHAN ? ERR_NOTONCHANNEL :                           alev == CHACCESS_NOTONCHAN ? ERR_NOTONCHANNEL :
461                           ERR_ONLYSERVERSCANCHANGE, chptr->name);                           ERR_ONLYSERVERSCANCHANGE, chptr->name);
462    
463      *errors |= SM_ERR_ONLYSERVER;      *errors |= SM_ERR_ONLYSERVER;
464      return;      return;
465    }    }
# Line 583  chm_ban(struct Client *source_p, struct Line 585  chm_ban(struct Client *source_p, struct
585        sendto_one_numeric(source_p, &me,        sendto_one_numeric(source_p, &me,
586                           alev == CHACCESS_NOTONCHAN ? ERR_NOTONCHANNEL :                           alev == CHACCESS_NOTONCHAN ? ERR_NOTONCHANNEL :
587                           ERR_CHANOPRIVSNEEDED, chptr->name);                           ERR_CHANOPRIVSNEEDED, chptr->name);
588    
589      *errors |= SM_ERR_NOOPS;      *errors |= SM_ERR_NOOPS;
590      return;      return;
591    }    }
# Line 652  chm_except(struct Client *source_p, stru Line 655  chm_except(struct Client *source_p, stru
655        sendto_one_numeric(source_p, &me,        sendto_one_numeric(source_p, &me,
656                           alev == CHACCESS_NOTONCHAN ? ERR_NOTONCHANNEL :                           alev == CHACCESS_NOTONCHAN ? ERR_NOTONCHANNEL :
657                           ERR_CHANOPRIVSNEEDED, chptr->name);                           ERR_CHANOPRIVSNEEDED, chptr->name);
658    
659      *errors |= SM_ERR_NOOPS;      *errors |= SM_ERR_NOOPS;
660      return;      return;
661    }    }
# Line 721  chm_invex(struct Client *source_p, struc Line 725  chm_invex(struct Client *source_p, struc
725        sendto_one_numeric(source_p, &me,        sendto_one_numeric(source_p, &me,
726                           alev == CHACCESS_NOTONCHAN ? ERR_NOTONCHANNEL :                           alev == CHACCESS_NOTONCHAN ? ERR_NOTONCHANNEL :
727                           ERR_CHANOPRIVSNEEDED, chptr->name);                           ERR_CHANOPRIVSNEEDED, chptr->name);
728    
729      *errors |= SM_ERR_NOOPS;      *errors |= SM_ERR_NOOPS;
730      return;      return;
731    }    }
# Line 769  chm_voice(struct Client *source_p, struc Line 774  chm_voice(struct Client *source_p, struc
774        sendto_one_numeric(source_p, &me,        sendto_one_numeric(source_p, &me,
775                           alev == CHACCESS_NOTONCHAN ? ERR_NOTONCHANNEL :                           alev == CHACCESS_NOTONCHAN ? ERR_NOTONCHANNEL :
776                           ERR_CHANOPRIVSNEEDED, chptr->name);                           ERR_CHANOPRIVSNEEDED, chptr->name);
777    
778      *errors |= SM_ERR_NOOPS;      *errors |= SM_ERR_NOOPS;
779      return;      return;
780    }    }
# Line 783  chm_voice(struct Client *source_p, struc Line 789  chm_voice(struct Client *source_p, struc
789    {    {
790      if (!(*errors & SM_ERR_NOTONCHANNEL))      if (!(*errors & SM_ERR_NOTONCHANNEL))
791        sendto_one_numeric(source_p, &me, ERR_USERNOTINCHANNEL, target_p->name, chptr->name);        sendto_one_numeric(source_p, &me, ERR_USERNOTINCHANNEL, target_p->name, chptr->name);
792    
793      *errors |= SM_ERR_NOTONCHANNEL;      *errors |= SM_ERR_NOTONCHANNEL;
794      return;      return;
795    }    }
# Line 793  chm_voice(struct Client *source_p, struc Line 800  chm_voice(struct Client *source_p, struc
800    /* no redundant mode changes */    /* no redundant mode changes */
801    if (dir == MODE_ADD &&  has_member_flags(member, CHFL_VOICE))    if (dir == MODE_ADD &&  has_member_flags(member, CHFL_VOICE))
802      return;      return;
803    
804    if (dir == MODE_DEL && !has_member_flags(member, CHFL_VOICE))    if (dir == MODE_DEL && !has_member_flags(member, CHFL_VOICE))
805      return;      return;
806    
# Line 820  chm_hop(struct Client *source_p, struct Line 828  chm_hop(struct Client *source_p, struct
828        sendto_one_numeric(source_p, &me,        sendto_one_numeric(source_p, &me,
829                           alev == CHACCESS_NOTONCHAN ? ERR_NOTONCHANNEL :                           alev == CHACCESS_NOTONCHAN ? ERR_NOTONCHANNEL :
830                           ERR_CHANOPRIVSNEEDED, chptr->name);                           ERR_CHANOPRIVSNEEDED, chptr->name);
831    
832      *errors |= SM_ERR_NOOPS;      *errors |= SM_ERR_NOOPS;
833      return;      return;
834    }    }
# Line 834  chm_hop(struct Client *source_p, struct Line 843  chm_hop(struct Client *source_p, struct
843    {    {
844      if (!(*errors & SM_ERR_NOTONCHANNEL))      if (!(*errors & SM_ERR_NOTONCHANNEL))
845        sendto_one_numeric(source_p, &me, ERR_USERNOTINCHANNEL, target_p->name, chptr->name);        sendto_one_numeric(source_p, &me, ERR_USERNOTINCHANNEL, target_p->name, chptr->name);
846    
847      *errors |= SM_ERR_NOTONCHANNEL;      *errors |= SM_ERR_NOTONCHANNEL;
848      return;      return;
849    }    }
# Line 844  chm_hop(struct Client *source_p, struct Line 854  chm_hop(struct Client *source_p, struct
854    /* no redundant mode changes */    /* no redundant mode changes */
855    if (dir == MODE_ADD &&  has_member_flags(member, CHFL_HALFOP))    if (dir == MODE_ADD &&  has_member_flags(member, CHFL_HALFOP))
856      return;      return;
857    
858    if (dir == MODE_DEL && !has_member_flags(member, CHFL_HALFOP))    if (dir == MODE_DEL && !has_member_flags(member, CHFL_HALFOP))
859      return;      return;
860    
# Line 871  chm_op(struct Client *source_p, struct C Line 882  chm_op(struct Client *source_p, struct C
882        sendto_one_numeric(source_p, &me,        sendto_one_numeric(source_p, &me,
883                           alev == CHACCESS_NOTONCHAN ? ERR_NOTONCHANNEL :                           alev == CHACCESS_NOTONCHAN ? ERR_NOTONCHANNEL :
884                           ERR_CHANOPRIVSNEEDED, chptr->name);                           ERR_CHANOPRIVSNEEDED, chptr->name);
885    
886      *errors |= SM_ERR_NOOPS;      *errors |= SM_ERR_NOOPS;
887      return;      return;
888    }    }
# Line 885  chm_op(struct Client *source_p, struct C Line 897  chm_op(struct Client *source_p, struct C
897    {    {
898      if (!(*errors & SM_ERR_NOTONCHANNEL))      if (!(*errors & SM_ERR_NOTONCHANNEL))
899        sendto_one_numeric(source_p, &me, ERR_USERNOTINCHANNEL, target_p->name, chptr->name);        sendto_one_numeric(source_p, &me, ERR_USERNOTINCHANNEL, target_p->name, chptr->name);
900    
901      *errors |= SM_ERR_NOTONCHANNEL;      *errors |= SM_ERR_NOTONCHANNEL;
902      return;      return;
903    }    }
# Line 895  chm_op(struct Client *source_p, struct C Line 908  chm_op(struct Client *source_p, struct C
908    /* no redundant mode changes */    /* no redundant mode changes */
909    if (dir == MODE_ADD &&  has_member_flags(member, CHFL_CHANOP))    if (dir == MODE_ADD &&  has_member_flags(member, CHFL_CHANOP))
910      return;      return;
911    
912    if (dir == MODE_DEL && !has_member_flags(member, CHFL_CHANOP))    if (dir == MODE_DEL && !has_member_flags(member, CHFL_CHANOP))
913      return;      return;
914    

Legend:
Removed from v.4882  
changed lines
  Added in v.4883

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28