RETORNI OMAI IL NOSTRO CORE

GIA BELLO SJDFSNF
This commit is contained in:
Alec Obradovich 2015-01-29 00:37:16 -06:00
parent 9660580f95
commit 993b7a95b5
3 changed files with 32 additions and 2 deletions

View file

@ -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");

View file

@ -80,6 +80,7 @@
<Compile Include="Condition.cs" />
<Compile Include="ConditionChecker.cs" />
<Compile Include="ConditionHolder.cs" />
<Compile Include="conditions\charcheck.cs" />
<Compile Include="conditions\msgcntword.cs" />
<Compile Include="conditions\msgcontains.cs" />
<Compile Include="conditions\msgis.cs" />

View file

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