From 993b7a95b5fd51c1d800f91f382b08bc852c788e Mon Sep 17 00:00:00 2001 From: Alec Obradovich Date: Thu, 29 Jan 2015 00:37:16 -0600 Subject: [PATCH] RETORNI OMAI IL NOSTRO CORE GIA BELLO SJDFSNF --- bot/bot/Bot.cs | 4 ++-- bot/bot/bot.csproj | 1 + bot/bot/conditions/charcheck.cs | 29 +++++++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 bot/bot/conditions/charcheck.cs diff --git a/bot/bot/Bot.cs b/bot/bot/Bot.cs index 3785203..b8bf83b 100644 --- a/bot/bot/Bot.cs +++ b/bot/bot/Bot.cs @@ -204,10 +204,10 @@ namespace bot { Message msg = Chat.waitForNewMessage(_G.driver); if(!ignoreResponses) { if(msg == null) break; - /*if(msg.msg == "!dump") { + if(msg.msg == "!dump") { foreach(Response r in responseList) Chat.sendMessage("IF " + r.condstr + " THEN " + r.responseType.Name); - }*/ + } if(msg.msg == "!update") { Bot.loadResponseList(); Chat.sendMessage("response list updated"); diff --git a/bot/bot/bot.csproj b/bot/bot/bot.csproj index 981d63e..c5fe957 100644 --- a/bot/bot/bot.csproj +++ b/bot/bot/bot.csproj @@ -80,6 +80,7 @@ + diff --git a/bot/bot/conditions/charcheck.cs b/bot/bot/conditions/charcheck.cs new file mode 100644 index 0000000..14e68d3 --- /dev/null +++ b/bot/bot/conditions/charcheck.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace bot.conditions +{ + class charcheck + { + static public string[] getInfo() + { + return new string[] { typeof(charcheck).Name, "char code exceeds" }; + } + + static public bool performCheck(Message msg, string parameter) + { + bool jarakar = false; + foreach (Char c in msg.msg) { + if (c > Int32.Parse(parameter)) + { + jarakar = true; + break; + } + } + return jarakar; + } + } +}