aboutsummaryrefslogtreecommitdiff
path: root/TimeHACK.Engine
diff options
context:
space:
mode:
authorlempamo <[email protected]>2017-03-31 17:44:01 -0400
committerlempamo <[email protected]>2017-03-31 17:44:01 -0400
commit27419aa0dce06f9af5ee28f64aace365dcb7d816 (patch)
tree89bdc54c2478130a2de98cfcc176a0b252676425 /TimeHACK.Engine
parentb2873bc67093dfdae2566ede9bda85230a37ff44 (diff)
downloadhistacom2-27419aa0dce06f9af5ee28f64aace365dcb7d816.tar.gz
histacom2-27419aa0dce06f9af5ee28f64aace365dcb7d816.tar.bz2
histacom2-27419aa0dce06f9af5ee28f64aace365dcb7d816.zip
webchat things
Diffstat (limited to 'TimeHACK.Engine')
-rw-r--r--TimeHACK.Engine/WCMessageParser.cs8
-rw-r--r--TimeHACK.Engine/WindowManager.cs2
2 files changed, 8 insertions, 2 deletions
diff --git a/TimeHACK.Engine/WCMessageParser.cs b/TimeHACK.Engine/WCMessageParser.cs
index ed16afd..44c9002 100644
--- a/TimeHACK.Engine/WCMessageParser.cs
+++ b/TimeHACK.Engine/WCMessageParser.cs
@@ -13,12 +13,18 @@ namespace TimeHACK.Engine
{
JObject message = JObject.Parse(JObject.Parse(json)["messages"][index].ToString());
string newmsg = message["message"].ToString().Replace("@user", user);
- return message["user"].ToString() + ": " + newmsg;
+ 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();
+ }
}
}
diff --git a/TimeHACK.Engine/WindowManager.cs b/TimeHACK.Engine/WindowManager.cs
index 193985a..4a1cf4e 100644
--- a/TimeHACK.Engine/WindowManager.cs
+++ b/TimeHACK.Engine/WindowManager.cs
@@ -9,7 +9,7 @@ namespace TimeHACK.Engine
{
public static System.Drawing.Text.PrivateFontCollection pfc = new System.Drawing.Text.PrivateFontCollection();
- public WinClassic startWinClassic(UserControl content, String title, PictureBox icon, Boolean MaxButton, Boolean MinButton)
+ public WinClassic startWinClassic(UserControl content, string title, PictureBox icon, bool MaxButton, bool MinButton)
{
// Setup Window
WinClassic app = new WinClassic();