소스 검색

Remove channel limit when limitraise is disabled (#76)

ducch 12 년 전
부모
커밋
574a5b0261
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      src/mod/channels.mod/chanmisc.c

+ 2 - 0
src/mod/channels.mod/chanmisc.c

@@ -385,6 +385,8 @@ int channel_modify(char *result, struct chanset_t *chan, int items, char **item,
           strlcpy(result, "channel limit needs argument", RESULT_LEN);
         return ERROR;
       }
+      if (chan->limitraise && !atoi(item[i]) && dolimit(chan)) //limitraise was disabled by the user
+        add_mode(chan, '-', 'l', "");
       chan->limitraise = atoi(item[i]);
       chan->limit_prot = 0;
     } else if (!strcmp(item[i], "fish-key")) {