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; + } + } +}