public static void Broadcast(RCon.LogType type, object obj) { if (RCon.listenerNew == null) { return; } RCon.Response response = new RCon.Response() { Identifier = -1, Message = JsonConvert.SerializeObject(obj, Formatting.Indented), Type = type }; if (string.IsNullOrEmpty(RCon.responseConnection)) { RCon.listenerNew.BroadcastMessage(JsonConvert.SerializeObject(response, Formatting.Indented)); return; } RCon.listenerNew.SendMessage(RCon.responseConnection, JsonConvert.SerializeObject(response, Formatting.Indented)); }
public static void Broadcast(RCon.LogType type, object obj) { if (RCon.listenerNew == null) { return; } RCon.Response response = new RCon.Response(); response.Identifier = -1; response.Message = JsonConvert.SerializeObject(obj, (Formatting)1); response.Type = type; if (string.IsNullOrEmpty(RCon.responseConnection)) { RCon.listenerNew.BroadcastMessage(JsonConvert.SerializeObject((object)response, (Formatting)1)); } else { RCon.listenerNew.SendMessage(RCon.responseConnection, JsonConvert.SerializeObject((object)response, (Formatting)1)); } }