From 222b5332f3cc8e4044fb062c11093d11f424e6d9 Mon Sep 17 00:00:00 2001 From: bearbear12345 Date: Sat, 20 Jul 2013 07:43:42 +1000 Subject: [PATCH] Started command list sequence. Typo: dictionnary -> dictionary --- MinecraftClient/Bots.cs | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/MinecraftClient/Bots.cs b/MinecraftClient/Bots.cs index 7463fb35..53a3ebec 100644 --- a/MinecraftClient/Bots.cs +++ b/MinecraftClient/Bots.cs @@ -552,18 +552,18 @@ namespace MinecraftClient public class Alerts : ChatBot { - private string[] dictionnary = new string[0]; + private string[] dictionary = new string[0]; private string[] excludelist = new string[0]; public override void Initialize() { if (System.IO.File.Exists("config/alerts.txt")) { - dictionnary = System.IO.File.ReadAllLines("config/alerts.txt"); + dictionary = System.IO.File.ReadAllLines("config/alerts.txt"); - for (int i = 0; i < dictionnary.Length; i++) + for (int i = 0; i < dictionary.Length; i++) { - dictionnary[i] = dictionnary[i].ToLower(); + dictionary[i] = dictionary[i].ToLower(); } } else LogToConsole("Cannot find alerts.txt in the config folder!"); @@ -584,7 +584,7 @@ namespace MinecraftClient { text = getVerbatim(text); string comp = text.ToLower(); - foreach (string alert in dictionnary) + foreach (string alert in dictionary) { if (comp.Contains(alert)) { @@ -764,7 +764,7 @@ namespace MinecraftClient public class AutoRelog : ChatBot { - private string[] dictionnary = new string[0]; + private string[] dictionary = new string[0]; private int attempts; private int delay; @@ -788,11 +788,11 @@ namespace MinecraftClient McTcpClient.AttemptsLeft = attempts; if (System.IO.File.Exists("config/kickmessages.txt")) { - dictionnary = System.IO.File.ReadAllLines("config/kickmessages.txt"); + dictionary = System.IO.File.ReadAllLines("config/kickmessages.txt"); - for (int i = 0; i < dictionnary.Length; i++) + for (int i = 0; i < dictionary.Length; i++) { - dictionnary[i] = dictionnary[i].ToLower(); + dictionary[i] = dictionary[i].ToLower(); } } else LogToConsole("Cannot find kickmessages.txt in the config directory!"); @@ -802,7 +802,7 @@ namespace MinecraftClient { message = getVerbatim(message); string comp = message.ToLower(); - foreach (string msg in dictionnary) + foreach (string msg in dictionary) { if (comp.Contains(msg)) { @@ -841,5 +841,15 @@ namespace MinecraftClient } } } + + /// + /// Runs a list of commands + /// Usage: bot:scripting:filename + /// + + public class scripting : ChatBot + { + + } } }