allow Network Services opping themselves and removed an old copyright message
[ircu2.10.12-pk.git] / ircd / channel.c
index 5a17a6bf21df3d859703b819c3138ecb01c0f797..b82d8e0780b25c4e3d0f8a92cb7ff71fd72a6d63 100644 (file)
@@ -2513,6 +2513,9 @@ mode_parse_access(struct ParseState *state, ulong64 *flag_p)
         return;
     }
     
+    if(feature_bool(FEAT_CHMODE_A_NOSET) && !(state->flags & MODE_PARSE_FORCE)) /* mode can'T be set. */
+        return;
+    
     if (!(state->flags & MODE_PARSE_WIPEOUT) &&
        (!t_access || t_access == state->chptr->mode.access))
       return;
@@ -3511,7 +3514,7 @@ mode_parse_client(struct ParseState *state, ulong64 *flag_p)
       } else if (req_oplevel <= MAXOPLEVEL)
         oplevel = req_oplevel;
     }
-    if(*flag_p == CHFL_CHANOP && state->member && !IsChanOp(state->member)) {
+    if(*flag_p == CHFL_CHANOP && state->member && !IsChanOp(state->member) && !(state->flags & MODE_PARSE_FORCE)) {
         send_notoper(state);
         return;
     }
@@ -4346,7 +4349,7 @@ int ext_amsg_block(struct Client *cptr, struct Channel *chptr, const char *msg)
     int p_pos = 0;
     int is_visible = 1, is_ccode = 0, i = 0, j = 0;
     char codes[5];
-    for(i = 0; p != '\n'; p = stripped_message[++i]) {
+    for(i = 0; p != '\n' && p != 0; p = stripped_message[++i]) {
       if(p == 3) {
         j = 0;
         is_ccode = 1;