From b337bb84b0edbc4464d71c5dd55a0acbada9a967 Mon Sep 17 00:00:00 2001 From: Aareschluchtje Date: Sat, 17 Oct 2015 10:42:24 +0200 Subject: [PATCH] gefaalde poging om de chat te fixen take 1 --- ErgometerLibrary/ChatMessage.cs | 4 +++- ErgometerLibrary/NetCommand.cs | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ErgometerLibrary/ChatMessage.cs b/ErgometerLibrary/ChatMessage.cs index 1b19465..6605674 100644 --- a/ErgometerLibrary/ChatMessage.cs +++ b/ErgometerLibrary/ChatMessage.cs @@ -5,12 +5,14 @@ public string Message { get; } public string Name { get; } public double TimeStamp { get; set;} + public bool IsDoctor { get; set; } - public ChatMessage(string name, string message) + public ChatMessage(string name, string message, bool isDoctor) { Name = name; Message = message; TimeStamp = Helper.Now; + IsDoctor = isDoctor; } public override string ToString() diff --git a/ErgometerLibrary/NetCommand.cs b/ErgometerLibrary/NetCommand.cs index 8da7c53..ac82bc9 100644 --- a/ErgometerLibrary/NetCommand.cs +++ b/ErgometerLibrary/NetCommand.cs @@ -124,7 +124,7 @@ namespace ErgometerLibrary { Type = CommandType.LOGIN; Session = session; - Timestamp = Helper.Now; + Timestamp = Helper.Now;//wtf is dit voor pure aids?????????? DisplayName = name; IsDoctor = doctor; @@ -142,7 +142,7 @@ namespace ErgometerLibrary if (com[1].StartsWith("ses")) session = int.Parse(com[1].Substring(3)); else - throw new FormatException("Error in NetCommend: " + com[1] + " is not a valid session."); + throw new FormatException("Error in NetCommand: " + com[1] + " is not a valid session."); string[] args = new string[com.Length-2]; for (int i = 2; i < com.Length; i++)