aboutsummaryrefslogtreecommitdiff
path: root/TimeHACK.Engine/WCMessageParser.cs
diff options
context:
space:
mode:
authorAlex-TIMEHACK <[email protected]>2017-05-01 10:15:05 +0100
committerAlex-TIMEHACK <[email protected]>2017-05-01 10:15:05 +0100
commita8bf32646b66951eef7f2e8477d83d4d3f013a87 (patch)
tree2659eea01895a4077c743aed399aff5631ba9b46 /TimeHACK.Engine/WCMessageParser.cs
parente557e46076e0fe44fb03633665ae40c7d7444461 (diff)
parent93c445239c7d28a6cee7147d7b6dbe3c7f0974f9 (diff)
downloadhistacom2-a8bf32646b66951eef7f2e8477d83d4d3f013a87.tar.gz
histacom2-a8bf32646b66951eef7f2e8477d83d4d3f013a87.tar.bz2
histacom2-a8bf32646b66951eef7f2e8477d83d4d3f013a87.zip
Trying to fix the conflicts
Diffstat (limited to 'TimeHACK.Engine/WCMessageParser.cs')
-rw-r--r--TimeHACK.Engine/WCMessageParser.cs30
1 files changed, 0 insertions, 30 deletions
diff --git a/TimeHACK.Engine/WCMessageParser.cs b/TimeHACK.Engine/WCMessageParser.cs
deleted file mode 100644
index ef7efd0..0000000
--- a/TimeHACK.Engine/WCMessageParser.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using Newtonsoft.Json.Linq;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace TimeHACK.Engine
-{
- public class WCMessageParser
- {
- public string ParseMessage(string json, int index, string user)
- {
- JObject message = JObject.Parse(JObject.Parse(json)["messages"][index].ToString());
- string newmsg = message["message"].ToString().Replace("@user", user);
- if (message["userchat"].ToObject<bool>()) return message["user"].ToString() + ": " + newmsg;
- else return newmsg;
- }
- public int GetMessageDelay(string json, int index)
- {
- JObject message = JObject.Parse(JObject.Parse(json)["messages"][index].ToString());
- return message["delay"].ToObject<int>();
- }
- public string GetSpecial(string json, int index)
- {
- JObject message = JObject.Parse(JObject.Parse(json)["messages"][index].ToString());
- return message["special"].ToString();
- }
- }
-}