浏览代码

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")) {