diff --git a/README.md b/README.md index 42d2f87..1335238 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,14 @@ # Reddit AutoModerator config generator --- +## https://discord.gg/JhNeVSq +### Discord support server +--- +![commits](https://img.shields.io/github/commit-activity/m/MiranDaniel/automod-generator?style=flat-square) +![issues](https://img.shields.io/github/issues-raw/MiranDaniel/automod-generator?style=flat-square) +![pr](https://img.shields.io/github/issues-pr-raw/MiranDaniel/automod-generator?style=flat-square) + +--- # Supported functions: ## Checks @@ -71,4 +79,4 @@ set_locked ``` moderators_exempt -``` +``` \ No newline at end of file diff --git a/automod-generator/automod-generator/Form1.cs b/automod-generator/automod-generator/Form1.cs index dc295b8..f970341 100644 --- a/automod-generator/automod-generator/Form1.cs +++ b/automod-generator/automod-generator/Form1.cs @@ -1,14 +1,6 @@ using System; using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Windows.Forms; -using System.Collections; -using System.IO; namespace automod_generator { @@ -66,7 +58,7 @@ private void Form1_Load(object sender, EventArgs e) listType.CheckOnClick = true; checkList.CheckOnClick = true; - + } @@ -85,9 +77,9 @@ public void compile() { string types = ""; - foreach(string te in listType.CheckedItems) + foreach (string te in listType.CheckedItems) { - if(types == "") + if (types == "") { types = te; } @@ -96,7 +88,7 @@ public void compile() types = types + "+" + te; } } - if(types != "") + if (types != "") { vars.typeData.Add("type: " + types); } @@ -117,9 +109,9 @@ void addPosCondition() addData = addData + "+" + item; } } - - if (checkRegex.Checked || checkCase.Checked) - { + + if (checkRegex.Checked || checkCase.Checked) + { addModifiers = "("; if (checkRegex.Checked && checkCase.Checked) { @@ -139,35 +131,35 @@ void addPosCondition() addModifiers = addModifiers + ")"; } addData = addData + addModifiers; - + if (checkList.CheckedItems.Count > 0) { addData = addData + ":"; } - addData = addData +" " + boxFind.Text; - if(addData != "") + addData = addData + " " + boxFind.Text; + if (addData != "") { vars.conditionData.Add(vars.prefix + addData); } foreach (string standard in standardList.CheckedItems) { - if(standardData == "") + if (standardData == "") { standardData = standard; } } - if(standardList.CheckedItems.Count > 0) + if (standardList.CheckedItems.Count > 0) { vars.conditionData.Add("standard: " + standardData); } - foreach(string useris in userisList.CheckedItems) + foreach (string useris in userisList.CheckedItems) { - if(userisData == "") + if (userisData == "") { vars.conditionData.Add("author:"); } userisData = useris; - if(vars.prefix == "") + if (vars.prefix == "") { vars.conditionData.Add(" " + useris + ": false"); } @@ -175,8 +167,8 @@ void addPosCondition() { vars.conditionData.Add(" " + useris + ": true"); } - - } + + } } void addNegCondition() { @@ -186,13 +178,13 @@ void addNegCondition() void addAction() { string actionData = ""; - foreach(string action in actionList.CheckedItems) + foreach (string action in actionList.CheckedItems) { actionData = "action: " + action; vars.actionData.Add(actionData); if (checkReason.Checked) { - if(action != "report") + if (action != "report") { vars.actionData.Add("action_reason: " + boxReason.Text); } @@ -202,16 +194,16 @@ void addAction() } } } - foreach(string action in moreactionList.CheckedItems) + foreach (string action in moreactionList.CheckedItems) { - vars.actionData.Add(action+": true"); + vars.actionData.Add(action + ": true"); } } void addModifier() { - foreach(string modifier in addList.CheckedItems) + foreach (string modifier in addList.CheckedItems) { - if(modifier == "moderators_exempt") + if (modifier == "moderators_exempt") { vars.modifierData.Add(modifier + ": false"); } @@ -240,11 +232,11 @@ void addModifier() string m = string.Join("\n", vars.modifierData); output.Text = output.Text + "\n" + m; string a = string.Join("\n", vars.actionData); - output.Text = output.Text +"\n"+ a; + output.Text = output.Text + "\n" + a; resetMemory(); - foreach(string item in settings.CheckedItems) + foreach (string item in settings.CheckedItems) { - if(item == "Clear selection after adding.") + if (item == "Clear selection after adding.") { clearSelection(); } @@ -272,7 +264,7 @@ private void ifButton_Click(object sender, EventArgs e) { vars.type = "addPosCondition"; compile(); - + } private void ifNotButton_Click(object sender, EventArgs e) @@ -305,7 +297,7 @@ private void resetButton_Click(object sender, EventArgs e) public void debug(string data) { - if(richTextBox2.Text == "") + if (richTextBox2.Text == "") { richTextBox2.Text = data; } @@ -344,7 +336,7 @@ private void clrselButton_Click(object sender, EventArgs e) private void debugButton_Click(object sender, EventArgs e) { - if(vars.debug == false) + if (vars.debug == false) { vars.debug = true; debug("enabled debug"); @@ -362,7 +354,7 @@ private void debugButton_Click(object sender, EventArgs e) richTextBox2.Visible = false; resetButton.Visible = false; } - + } } } diff --git a/automod-generator/automod-generator/Program.cs b/automod-generator/automod-generator/Program.cs index 64227d8..cbff77b 100644 --- a/automod-generator/automod-generator/Program.cs +++ b/automod-generator/automod-generator/Program.cs @@ -1,7 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using System.Windows.Forms; namespace automod_generator diff --git a/automod-generator/automod-generator/Properties/AssemblyInfo.cs b/automod-generator/automod-generator/Properties/AssemblyInfo.cs index 86ab185..a6add9c 100644 --- a/automod-generator/automod-generator/Properties/AssemblyInfo.cs +++ b/automod-generator/automod-generator/Properties/AssemblyInfo.cs @@ -1,5 +1,4 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following diff --git a/automod-generator/automod-generator/obj/Release/DesignTimeResolveAssemblyReferences.cache b/automod-generator/automod-generator/obj/Release/DesignTimeResolveAssemblyReferences.cache index 32feef4..cafef12 100644 Binary files a/automod-generator/automod-generator/obj/Release/DesignTimeResolveAssemblyReferences.cache and b/automod-generator/automod-generator/obj/Release/DesignTimeResolveAssemblyReferences.cache differ