1
0
Fork 0
mirror of https://codeberg.org/demostf/parser.git synced 2026-06-03 10:14:06 +02:00

show server send messages as chat

This commit is contained in:
Robin Appelman 2024-03-29 16:26:43 +01:00
commit 217211f2fb
12 changed files with 785 additions and 45 deletions

4
Cargo.lock generated
View file

@ -959,8 +959,6 @@ dependencies = [
[[package]] [[package]]
name = "schemars" name = "schemars"
version = "0.8.16" version = "0.8.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "45a28f4c49489add4ce10783f7911893516f15afe45d015608d41faca6bc4d29"
dependencies = [ dependencies = [
"dyn-clone", "dyn-clone",
"schemars_derive", "schemars_derive",
@ -971,8 +969,6 @@ dependencies = [
[[package]] [[package]]
name = "schemars_derive" name = "schemars_derive"
version = "0.8.16" version = "0.8.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c767fd6fa65d9ccf9cf026122c1b555f2ef9a4f0cea69da4d7dbc3e258d30967"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",

View file

@ -68,6 +68,10 @@ tempfile = { version = "3", optional = true }
lazy_static = { version = "1", optional = true } lazy_static = { version = "1", optional = true }
prettyplease = { version = "0.1", optional = true } prettyplease = { version = "0.1", optional = true }
[patch.crates-io]
schemars = { path = '../../rust/schemars/schemars' }
schemars_derive = { path = '../../rust/schemars/schemars_derive' }
[features] [features]
schema = ["schemars", "bitbuffer/schemars"] schema = ["schemars", "bitbuffer/schemars"]
trace = ["tracing", "tracing-subscriber"] trace = ["tracing", "tracing-subscriber"]

View file

@ -247,39 +247,43 @@ pub struct SayText2Message {
pub text: MaybeUtf8String, pub text: MaybeUtf8String,
} }
fn to_plain_text(text: &str) -> String {
// 1: normal, 2: old colors, 3: team, 4: location, 5 achievement, 6 custom
let mut text = text.replace(|c| c <= char::from(6), "");
// 7: 6-char hex
while let Some(pos) = text.chars().enumerate().find_map(|(index, c)| {
if c == char::from(7) {
Some(index)
} else {
None
}
}) {
text = text
.chars()
.take(pos)
.chain(text.chars().skip(pos + 7))
.collect();
}
// 9: 8-char hex
while let Some(pos) = text.chars().enumerate().find_map(|(index, c)| {
if c == char::from(9) {
Some(index)
} else {
None
}
}) {
text = text
.chars()
.take(pos)
.chain(text.chars().skip(pos + 9))
.collect();
}
text
}
impl SayText2Message { impl SayText2Message {
pub fn plain_text(&self) -> String { pub fn plain_text(&self) -> String {
// 1: normal, 2: old colors, 3: team, 4: location, 5 achievement, 6 custom to_plain_text(self.text.as_ref())
let mut text = self.text.to_string().replace(|c| c <= char::from(6), "");
// 7: 6-char hex
while let Some(pos) = text.chars().enumerate().find_map(|(index, c)| {
if c == char::from(7) {
Some(index)
} else {
None
}
}) {
text = text
.chars()
.take(pos)
.chain(text.chars().skip(pos + 7))
.collect();
}
// 9: 8-char hex
while let Some(pos) = text.chars().enumerate().find_map(|(index, c)| {
if c == char::from(9) {
Some(index)
} else {
None
}
}) {
text = text
.chars()
.take(pos)
.chain(text.chars().skip(pos + 9))
.collect();
}
text
} }
} }
@ -364,6 +368,12 @@ pub struct TextMessage {
pub substitute: [MaybeUtf8String; 4], pub substitute: [MaybeUtf8String; 4],
} }
impl TextMessage {
pub fn plain_text(&self) -> String {
to_plain_text(self.text.as_ref())
}
}
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
#[derive(BitRead, BitWrite, Debug, Clone, PartialEq, Serialize, Deserialize)] #[derive(BitRead, BitWrite, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ResetHudMessage { pub struct ResetHudMessage {

View file

@ -3,7 +3,9 @@ use crate::demo::gameevent_gen::{
GameEvent, PlayerDeathEvent, PlayerSpawnEvent, TeamPlayRoundWinEvent, GameEvent, PlayerDeathEvent, PlayerSpawnEvent, TeamPlayRoundWinEvent,
}; };
use crate::demo::message::packetentities::EntityId; use crate::demo::message::packetentities::EntityId;
use crate::demo::message::usermessage::{ChatMessageKind, SayText2Message, UserMessage}; use crate::demo::message::usermessage::{
ChatMessageKind, HudTextLocation, SayText2Message, TextMessage, UserMessage,
};
use crate::demo::message::{Message, MessageType}; use crate::demo::message::{Message, MessageType};
use crate::demo::packet::stringtable::StringTableEntry; use crate::demo::packet::stringtable::StringTableEntry;
use crate::demo::parser::handler::{BorrowMessageHandler, MessageHandler}; use crate::demo::parser::handler::{BorrowMessageHandler, MessageHandler};
@ -39,6 +41,15 @@ impl ChatMessage {
tick, tick,
} }
} }
pub fn from_text(message: &TextMessage, tick: DemoTick) -> Self {
ChatMessage {
kind: ChatMessageKind::Empty,
from: String::new(),
text: message.plain_text(),
tick,
}
}
} }
#[derive( #[derive(
@ -457,16 +468,26 @@ impl Analyser {
} }
fn handle_user_message(&mut self, message: &UserMessage, tick: DemoTick) { fn handle_user_message(&mut self, message: &UserMessage, tick: DemoTick) {
if let UserMessage::SayText2(text_message) = message { match message {
if text_message.kind == ChatMessageKind::NameChange { UserMessage::SayText2(text_message) => {
if let Some(from) = text_message.from.clone() { if text_message.kind == ChatMessageKind::NameChange {
self.change_name(from.into(), text_message.plain_text()); if let Some(from) = text_message.from.clone() {
self.change_name(from.into(), text_message.plain_text());
}
} else {
self.state
.chat
.push(ChatMessage::from_message(text_message, tick));
} }
} else {
self.state
.chat
.push(ChatMessage::from_message(text_message, tick));
} }
UserMessage::Text(text_message) => {
if text_message.location == HudTextLocation::PrintTalk {
self.state
.chat
.push(ChatMessage::from_text(text_message, tick));
}
}
_ => {}
} }
} }

View file

@ -4,30 +4,90 @@ expression: state
--- ---
{ {
"chat": [ "chat": [
{
"kind": "Empty",
"from": "",
"text": "[demos.tf]: Demo recording completed",
"tick": 0
},
{ {
"kind": "TF_Chat_All", "kind": "TF_Chat_All",
"from": "frying pan", "from": "frying pan",
"text": "gamers assembly", "text": "gamers assembly",
"tick": 16 "tick": 16
}, },
{
"kind": "Empty",
"from": "",
"text": "[demos.tf]: Uploading demo auto-20181103-2046-pl_upward.dem",
"tick": 204
},
{
"kind": "Empty",
"from": "",
"text": "[demos.tf]: Demos must be at least 5 minutes long",
"tick": 2638
},
{ {
"kind": "TF_Chat_All", "kind": "TF_Chat_All",
"from": "Sian", "from": "Sian",
"text": "thanks @demos.tf", "text": "thanks @demos.tf",
"tick": 3284 "tick": 3284
}, },
{
"kind": "Empty",
"from": "",
"text": "[STV Stats] RED lost their uber advantage (39 seconds)",
"tick": 4376
},
{
"kind": "Empty",
"from": "",
"text": "[STV Stats] BLU had uber for 48 seconds before using it",
"tick": 12508
},
{ {
"kind": "TF_Chat_AllDead", "kind": "TF_Chat_AllDead",
"from": "frying pan", "from": "frying pan",
"text": ":(", "text": ":(",
"tick": 20640 "tick": 20640
}, },
{
"kind": "Empty",
"from": "",
"text": "[STV Stats] BLU spent 16.6 seconds after spawning before healing",
"tick": 23676
},
{
"kind": "Empty",
"from": "",
"text": "[STV Stats] RED lost their uber advantage (11 seconds)",
"tick": 27124
},
{
"kind": "Empty",
"from": "",
"text": "[STV Stats] RED's medic died with 100% uber",
"tick": 27540
},
{ {
"kind": "TF_Chat_AllDead", "kind": "TF_Chat_AllDead",
"from": "Chochy", "from": "Chochy",
"text": "epic map", "text": "epic map",
"tick": 29596 "tick": 29596
}, },
{
"kind": "Empty",
"from": "",
"text": "[STV Stats] BLU had uber for 80 seconds before using it",
"tick": 32424
},
{
"kind": "Empty",
"from": "",
"text": "[STV Stats] RED's medic died with 100% uber",
"tick": 38084
},
{ {
"kind": "TF_Chat_AllDead", "kind": "TF_Chat_AllDead",
"from": "Mystt", "from": "Mystt",
@ -46,6 +106,12 @@ expression: state
"text": "why are you up there", "text": "why are you up there",
"tick": 46256 "tick": 46256
}, },
{
"kind": "Empty",
"from": "",
"text": "#TF_TeamsSwitched",
"tick": 48464
},
{ {
"kind": "TF_Chat_All", "kind": "TF_Chat_All",
"from": "frying pan", "from": "frying pan",
@ -58,6 +124,18 @@ expression: state
"text": "!log", "text": "!log",
"tick": 49060 "tick": 49060
}, },
{
"kind": "Empty",
"from": "",
"text": "[STV Stats] BLU lost their uber advantage (11 seconds)",
"tick": 52764
},
{
"kind": "Empty",
"from": "",
"text": "[STV Stats] BLU had uber for 72 seconds before using it",
"tick": 57374
},
{ {
"kind": "TF_Chat_AllDead", "kind": "TF_Chat_AllDead",
"from": "Chochy", "from": "Chochy",
@ -70,6 +148,24 @@ expression: state
"text": "t", "text": "t",
"tick": 60618 "tick": 60618
}, },
{
"kind": "Empty",
"from": "",
"text": "[STV Stats] BLU lost their uber advantage (19 seconds)",
"tick": 81376
},
{
"kind": "Empty",
"from": "",
"text": "[STV Stats] BLU's medic died with 100% uber",
"tick": 82206
},
{
"kind": "Empty",
"from": "",
"text": "[STV Stats] BLU spent 9.1 seconds after spawning before healing",
"tick": 83404
},
{ {
"kind": "TF_Chat_AllDead", "kind": "TF_Chat_AllDead",
"from": "Chochy", "from": "Chochy",
@ -88,6 +184,12 @@ expression: state
"text": "gg", "text": "gg",
"tick": 85732 "tick": 85732
}, },
{
"kind": "Empty",
"from": "",
"text": "[SOAP] Plugins reloaded.",
"tick": 85900
},
{ {
"kind": "TF_Chat_All", "kind": "TF_Chat_All",
"from": "", "from": "",

View file

@ -34,6 +34,12 @@ expression: state
"text": "gr", "text": "gr",
"tick": 47043 "tick": 47043
}, },
{
"kind": "Empty",
"from": "",
"text": "#TF_TeamsSwitched",
"tick": 47283
},
{ {
"kind": "TF_Chat_All", "kind": "TF_Chat_All",
"from": "", "from": "",
@ -394,6 +400,12 @@ expression: state
"text": "[LogsTF] Uploading logs...", "text": "[LogsTF] Uploading logs...",
"tick": 85836 "tick": 85836
}, },
{
"kind": "Empty",
"from": "",
"text": "[demos.tf]: Demo recording completed",
"tick": 85843
},
{ {
"kind": "TF_Chat_Team_Dead", "kind": "TF_Chat_Team_Dead",
"from": "huge obese guy", "from": "huge obese guy",
@ -406,6 +418,12 @@ expression: state
"text": "!log", "text": "!log",
"tick": 86033 "tick": 86033
}, },
{
"kind": "Empty",
"from": "",
"text": "[demos.tf]: Uploading demo 20190819-2009-pl_upward.dem",
"tick": 86033
},
{ {
"kind": "TF_Chat_All", "kind": "TF_Chat_All",
"from": "", "from": "",
@ -418,6 +436,12 @@ expression: state
"text": "[LogsTF] To see the stats, type: !log", "text": "[LogsTF] To see the stats, type: !log",
"tick": 86133 "tick": 86133
}, },
{
"kind": "Empty",
"from": "",
"text": "[demos.tf]: json_decode error: Syntax error",
"tick": 86218
},
{ {
"kind": "TF_Chat_All", "kind": "TF_Chat_All",
"from": "^D The Godfather | KING", "from": "^D The Godfather | KING",

View file

@ -4,12 +4,48 @@ expression: state
--- ---
{ {
"chat": [ "chat": [
{
"kind": "Empty",
"from": "",
"text": "[demos.tf]: Demo recording completed",
"tick": 1
},
{
"kind": "Empty",
"from": "",
"text": "[demos.tf]: Uploading demo auto-20210602-2316-cp_sunshine.dem",
"tick": 200
},
{
"kind": "Empty",
"from": "",
"text": "[demos.tf]: json_decode error: Syntax error",
"tick": 1046
},
{ {
"kind": "TF_Chat_All", "kind": "TF_Chat_All",
"from": "", "from": "",
"text": "", "text": "",
"tick": 4280 "tick": 4280
}, },
{
"kind": "Empty",
"from": "",
"text": "[STV Stats] BLU lost their uber advantage (19 seconds)",
"tick": 8693
},
{
"kind": "Empty",
"from": "",
"text": "[STV Stats] BLU had uber for 33 seconds before using it",
"tick": 9663
},
{
"kind": "Empty",
"from": "",
"text": "[STV Stats] RED had uber for 33 seconds before using it",
"tick": 10892
},
{ {
"kind": "TF_Chat_All", "kind": "TF_Chat_All",
"from": "", "from": "",
@ -40,6 +76,12 @@ expression: state
"text": "se me parte la cabeza : tengo a v1lshock clavandome su ojo en la cara", "text": "se me parte la cabeza : tengo a v1lshock clavandome su ojo en la cara",
"tick": 16714 "tick": 16714
}, },
{
"kind": "Empty",
"from": "",
"text": "[STV Stats] RED lost their uber advantage (11 seconds)",
"tick": 16714
},
{ {
"kind": "TF_Chat_All", "kind": "TF_Chat_All",
"from": "", "from": "",
@ -118,18 +160,48 @@ expression: state
"text": "[PH] Bienvenido a puntero's Hub.", "text": "[PH] Bienvenido a puntero's Hub.",
"tick": 36280 "tick": 36280
}, },
{
"kind": "Empty",
"from": "",
"text": "[STV Stats] BLU had uber for 33 seconds before using it",
"tick": 38818
},
{
"kind": "Empty",
"from": "",
"text": "[STV Stats] RED had uber for 31 seconds before using it",
"tick": 39002
},
{ {
"kind": "TF_Chat_All", "kind": "TF_Chat_All",
"from": "", "from": "",
"text": "[PH] Únete a nuestro Discord para conocer más sobre el servidor: https://discord.gg/bfWRBKGZDQ", "text": "[PH] Únete a nuestro Discord para conocer más sobre el servidor: https://discord.gg/bfWRBKGZDQ",
"tick": 44280 "tick": 44280
}, },
{
"kind": "Empty",
"from": "",
"text": "[STV Stats] BLU had uber for 70 seconds before using it",
"tick": 48889
},
{
"kind": "Empty",
"from": "",
"text": "[STV Stats] RED had uber for 102 seconds before using it",
"tick": 50247
},
{ {
"kind": "TF_Chat_All", "kind": "TF_Chat_All",
"from": "", "from": "",
"text": "[PH] ¿Beneficios? Toda información sobre el servidor en nuestro Discord.", "text": "[PH] ¿Beneficios? Toda información sobre el servidor en nuestro Discord.",
"tick": 52280 "tick": 52280
}, },
{
"kind": "Empty",
"from": "",
"text": "[STV Stats] RED lost their uber advantage (18 seconds)",
"tick": 59620
},
{ {
"kind": "TF_Chat_All", "kind": "TF_Chat_All",
"from": "", "from": "",
@ -142,12 +214,24 @@ expression: state
"text": "", "text": "",
"tick": 68280 "tick": 68280
}, },
{
"kind": "Empty",
"from": "",
"text": "[STV Stats] BLU had uber for 37 seconds before using it",
"tick": 69421
},
{ {
"kind": "TF_Chat_All", "kind": "TF_Chat_All",
"from": "", "from": "",
"text": "", "text": "",
"tick": 76280 "tick": 76280
}, },
{
"kind": "Empty",
"from": "",
"text": "[STV Stats] RED lost their uber advantage (12 seconds)",
"tick": 76513
},
{ {
"kind": "TF_Chat_All", "kind": "TF_Chat_All",
"from": "", "from": "",

View file

@ -22,6 +22,12 @@ expression: state
"text": "[P-REC] Recording...", "text": "[P-REC] Recording...",
"tick": 8 "tick": 8
}, },
{
"kind": "Empty",
"from": "",
"text": "Recording started",
"tick": 47
},
{ {
"kind": "TF_Chat_Team", "kind": "TF_Chat_Team",
"from": "Trademark", "from": "Trademark",
@ -34,6 +40,18 @@ expression: state
"text": "u b e r e d u b e r e d u b e r e d ", "text": "u b e r e d u b e r e d u b e r e d ",
"tick": 4378 "tick": 4378
}, },
{
"kind": "Empty",
"from": "",
"text": "Red: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 5.10\n",
"tick": 4700
},
{
"kind": "Empty",
"from": "",
"text": "Blue: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 5.10\n",
"tick": 4700
},
{ {
"kind": "TF_Chat_All", "kind": "TF_Chat_All",
"from": "distraughtduck4", "from": "distraughtduck4",
@ -46,12 +64,48 @@ expression: state
"text": "[LogsTF] To see the stats from the previous rounds, type: .ss", "text": "[LogsTF] To see the stats from the previous rounds, type: .ss",
"tick": 7479 "tick": 7479
}, },
{
"kind": "Empty",
"from": "",
"text": "#game_spawn_as",
"tick": 8057
},
{ {
"kind": "TF_Chat_Team", "kind": "TF_Chat_Team",
"from": "Trademark", "from": "Trademark",
"text": "u b e r e d u b e r e d u b e r e d ", "text": "u b e r e d u b e r e d u b e r e d ",
"tick": 12561 "tick": 12561
}, },
{
"kind": "Empty",
"from": "",
"text": "#game_spawn_as",
"tick": 12777
},
{
"kind": "Empty",
"from": "",
"text": "Red: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 2.76\n",
"tick": 13168
},
{
"kind": "Empty",
"from": "",
"text": "Blue: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 2.76\n",
"tick": 13168
},
{
"kind": "Empty",
"from": "",
"text": "Red: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 5.34\n",
"tick": 18133
},
{
"kind": "Empty",
"from": "",
"text": "Blue: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 5.34\n",
"tick": 18133
},
{ {
"kind": "TF_Chat_Team", "kind": "TF_Chat_Team",
"from": "Trademark", "from": "Trademark",
@ -106,6 +160,30 @@ expression: state
"text": "die meatshot die meatshot DIE DIE", "text": "die meatshot die meatshot DIE DIE",
"tick": 22725 "tick": 22725
}, },
{
"kind": "Empty",
"from": "",
"text": "Red: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 3.27\n",
"tick": 23110
},
{
"kind": "Empty",
"from": "",
"text": "Blue: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 3.27\n",
"tick": 23110
},
{
"kind": "Empty",
"from": "",
"text": "Red: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 5.40\n",
"tick": 24368
},
{
"kind": "Empty",
"from": "",
"text": "Blue: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 5.40\n",
"tick": 24368
},
{ {
"kind": "TF_Chat_All", "kind": "TF_Chat_All",
"from": "schy", "from": "schy",
@ -124,18 +202,78 @@ expression: state
"text": "ns trade", "text": "ns trade",
"tick": 30781 "tick": 30781
}, },
{
"kind": "Empty",
"from": "",
"text": "Red: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 5.03\n",
"tick": 31867
},
{
"kind": "Empty",
"from": "",
"text": "Blue: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 5.03\n",
"tick": 31867
},
{ {
"kind": "TF_Chat_Team_Dead", "kind": "TF_Chat_Team_Dead",
"from": "Trademark", "from": "Trademark",
"text": "u b e r e d u b e r e d u b e r e d ", "text": "u b e r e d u b e r e d u b e r e d ",
"tick": 32301 "tick": 32301
}, },
{
"kind": "Empty",
"from": "",
"text": "Red: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 5.97\n",
"tick": 36008
},
{
"kind": "Empty",
"from": "",
"text": "Blue: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 5.97\n",
"tick": 36008
},
{ {
"kind": "TF_Chat_Team", "kind": "TF_Chat_Team",
"from": "Trademark", "from": "Trademark",
"text": ">> FAKE << ", "text": ">> FAKE << ",
"tick": 36538 "tick": 36538
}, },
{
"kind": "Empty",
"from": "",
"text": "Red: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 6.26\n",
"tick": 40189
},
{
"kind": "Empty",
"from": "",
"text": "Blue: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 6.26\n",
"tick": 40189
},
{
"kind": "Empty",
"from": "",
"text": "Red: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 5.06\n",
"tick": 42138
},
{
"kind": "Empty",
"from": "",
"text": "Blue: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 5.06\n",
"tick": 42138
},
{
"kind": "Empty",
"from": "",
"text": "Red: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 5.06\n",
"tick": 46341
},
{
"kind": "Empty",
"from": "",
"text": "Blue: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 5.06\n",
"tick": 46341
},
{ {
"kind": "TF_Chat_All", "kind": "TF_Chat_All",
"from": "distraughtduck4", "from": "distraughtduck4",
@ -148,6 +286,18 @@ expression: state
"text": "u b e r e d u b e r e d u b e r e d ", "text": "u b e r e d u b e r e d u b e r e d ",
"tick": 47044 "tick": 47044
}, },
{
"kind": "Empty",
"from": "",
"text": "Red: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 3.80\n",
"tick": 47830
},
{
"kind": "Empty",
"from": "",
"text": "Blue: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 3.80\n",
"tick": 47830
},
{ {
"kind": "TF_Chat_AllDead", "kind": "TF_Chat_AllDead",
"from": "anytime will do my love", "from": "anytime will do my love",
@ -184,12 +334,24 @@ expression: state
"text": "ns", "text": "ns",
"tick": 51384 "tick": 51384
}, },
{
"kind": "Empty",
"from": "",
"text": "#game_spawn_as",
"tick": 51849
},
{ {
"kind": "TF_Chat_Team", "kind": "TF_Chat_Team",
"from": "Trademark", "from": "Trademark",
"text": "u b e r e d u b e r e d u b e r e d ", "text": "u b e r e d u b e r e d u b e r e d ",
"tick": 53540 "tick": 53540
}, },
{
"kind": "Empty",
"from": "",
"text": "#game_spawn_as",
"tick": 55747
},
{ {
"kind": "TF_Chat_All", "kind": "TF_Chat_All",
"from": "distraughtduck4", "from": "distraughtduck4",
@ -214,6 +376,12 @@ expression: state
"text": "just dont", "text": "just dont",
"tick": 61843 "tick": 61843
}, },
{
"kind": "Empty",
"from": "",
"text": "#game_spawn_as",
"tick": 62024
},
{ {
"kind": "TF_Chat_AllDead", "kind": "TF_Chat_AllDead",
"from": "jinta", "from": "jinta",
@ -238,6 +406,12 @@ expression: state
"text": "engi dm", "text": "engi dm",
"tick": 63679 "tick": 63679
}, },
{
"kind": "Empty",
"from": "",
"text": "#game_spawn_as",
"tick": 63704
},
{ {
"kind": "TF_Chat_All", "kind": "TF_Chat_All",
"from": "jinta", "from": "jinta",
@ -268,6 +442,30 @@ expression: state
"text": "u lived i hate u", "text": "u lived i hate u",
"tick": 67728 "tick": 67728
}, },
{
"kind": "Empty",
"from": "",
"text": "Red: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 0.84\n",
"tick": 68298
},
{
"kind": "Empty",
"from": "",
"text": "Blue: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 0.84\n",
"tick": 68298
},
{
"kind": "Empty",
"from": "",
"text": "Red: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 2.49\n",
"tick": 70522
},
{
"kind": "Empty",
"from": "",
"text": "Blue: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 2.49\n",
"tick": 70522
},
{ {
"kind": "TF_Chat_AllDead", "kind": "TF_Chat_AllDead",
"from": "Trademark", "from": "Trademark",
@ -340,12 +538,30 @@ expression: state
"text": "u b e r e d u b e r e d u b e r e d ", "text": "u b e r e d u b e r e d u b e r e d ",
"tick": 76283 "tick": 76283
}, },
{
"kind": "Empty",
"from": "",
"text": "#game_spawn_as",
"tick": 76353
},
{ {
"kind": "TF_Chat_Team_Dead", "kind": "TF_Chat_Team_Dead",
"from": "Trademark", "from": "Trademark",
"text": "u b e r e d u b e r e d u b e r e d ", "text": "u b e r e d u b e r e d u b e r e d ",
"tick": 76854 "tick": 76854
}, },
{
"kind": "Empty",
"from": "",
"text": "Red: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 6.30\n",
"tick": 77024
},
{
"kind": "Empty",
"from": "",
"text": "Blue: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 6.30\n",
"tick": 77024
},
{ {
"kind": "TF_Chat_All", "kind": "TF_Chat_All",
"from": "anytime will do my love", "from": "anytime will do my love",
@ -364,6 +580,18 @@ expression: state
"text": "oh", "text": "oh",
"tick": 80225 "tick": 80225
}, },
{
"kind": "Empty",
"from": "",
"text": "Red: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 5.33\n",
"tick": 80357
},
{
"kind": "Empty",
"from": "",
"text": "Blue: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 5.33\n",
"tick": 80357
},
{ {
"kind": "TF_Chat_All", "kind": "TF_Chat_All",
"from": "schy", "from": "schy",
@ -442,6 +670,18 @@ expression: state
"text": "owned noob", "text": "owned noob",
"tick": 82584 "tick": 82584
}, },
{
"kind": "Empty",
"from": "",
"text": "Red: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 2.55\n",
"tick": 83344
},
{
"kind": "Empty",
"from": "",
"text": "Blue: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 2.55\n",
"tick": 83344
},
{ {
"kind": "TF_Chat_Team", "kind": "TF_Chat_Team",
"from": "Trademark", "from": "Trademark",
@ -472,6 +712,66 @@ expression: state
"text": "schys gay", "text": "schys gay",
"tick": 85718 "tick": 85718
}, },
{
"kind": "Empty",
"from": "",
"text": "Red: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 3.44\n",
"tick": 86149
},
{
"kind": "Empty",
"from": "",
"text": "Blue: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 3.44\n",
"tick": 86149
},
{
"kind": "Empty",
"from": "",
"text": "Red: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 1.46\n",
"tick": 86281
},
{
"kind": "Empty",
"from": "",
"text": "Blue: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 1.46\n",
"tick": 86281
},
{
"kind": "Empty",
"from": "",
"text": "Red: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 1.13\n",
"tick": 86305
},
{
"kind": "Empty",
"from": "",
"text": "Blue: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 1.13\n",
"tick": 86305
},
{
"kind": "Empty",
"from": "",
"text": "Red: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 0.06\n",
"tick": 86841
},
{
"kind": "Empty",
"from": "",
"text": "Blue: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 0.06\n",
"tick": 86841
},
{
"kind": "Empty",
"from": "",
"text": "Red: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 5.76\n",
"tick": 86928
},
{
"kind": "Empty",
"from": "",
"text": "Blue: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 5.76\n",
"tick": 86928
},
{ {
"kind": "TF_Chat_All", "kind": "TF_Chat_All",
"from": "distraughtduck4", "from": "distraughtduck4",
@ -514,6 +814,12 @@ expression: state
"text": "meatshot die die DIE", "text": "meatshot die die DIE",
"tick": 88336 "tick": 88336
}, },
{
"kind": "Empty",
"from": "",
"text": "[SM] You are flooding the server!",
"tick": 88420
},
{ {
"kind": "TF_Chat_All", "kind": "TF_Chat_All",
"from": "Boog", "from": "Boog",
@ -598,6 +904,30 @@ expression: state
"text": "meatshot die meatshot die MEATSHOT DIE", "text": "meatshot die meatshot die MEATSHOT DIE",
"tick": 89444 "tick": 89444
}, },
{
"kind": "Empty",
"from": "",
"text": "Red: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 5.07\n",
"tick": 90243
},
{
"kind": "Empty",
"from": "",
"text": "Blue: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 5.07\n",
"tick": 90243
},
{
"kind": "Empty",
"from": "",
"text": "Red: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 1.98\n",
"tick": 90449
},
{
"kind": "Empty",
"from": "",
"text": "Blue: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 1.98\n",
"tick": 90449
},
{ {
"kind": "TF_Chat_All", "kind": "TF_Chat_All",
"from": "distraughtduck4", "from": "distraughtduck4",
@ -616,6 +946,18 @@ expression: state
"text": "meatshot die die DIE", "text": "meatshot die die DIE",
"tick": 91124 "tick": 91124
}, },
{
"kind": "Empty",
"from": "",
"text": "Red: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 6.87\n",
"tick": 91525
},
{
"kind": "Empty",
"from": "",
"text": "Blue: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 6.87\n",
"tick": 91525
},
{ {
"kind": "TF_Chat_All", "kind": "TF_Chat_All",
"from": "Boog", "from": "Boog",
@ -646,6 +988,18 @@ expression: state
"text": "meatshot meatshot meatshot DIE", "text": "meatshot meatshot meatshot DIE",
"tick": 95070 "tick": 95070
}, },
{
"kind": "Empty",
"from": "",
"text": "Red: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 3.29\n",
"tick": 95499
},
{
"kind": "Empty",
"from": "",
"text": "Blue: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 3.29\n",
"tick": 95499
},
{ {
"kind": "TF_Chat_AllDead", "kind": "TF_Chat_AllDead",
"from": "anytime will do my love", "from": "anytime will do my love",
@ -688,6 +1042,12 @@ expression: state
"text": "MEATSHOT DIE DIE", "text": "MEATSHOT DIE DIE",
"tick": 99674 "tick": 99674
}, },
{
"kind": "Empty",
"from": "",
"text": "#game_spawn_as",
"tick": 99811
},
{ {
"kind": "TF_Chat_AllDead", "kind": "TF_Chat_AllDead",
"from": "jinta", "from": "jinta",
@ -718,6 +1078,18 @@ expression: state
"text": "Ze Venetian Doktor! : Be Quite im playing you asse", "text": "Ze Venetian Doktor! : Be Quite im playing you asse",
"tick": 101398 "tick": 101398
}, },
{
"kind": "Empty",
"from": "",
"text": "Red: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 4.43\n",
"tick": 101811
},
{
"kind": "Empty",
"from": "",
"text": "Blue: Min Spawn 8.90, Scalar 0.79, Next Spawn In: 4.43\n",
"tick": 101811
},
{ {
"kind": "TF_Chat_Team", "kind": "TF_Chat_Team",
"from": "Trademark", "from": "Trademark",
@ -736,6 +1108,12 @@ expression: state
"text": "jinta ive seen you win these before", "text": "jinta ive seen you win these before",
"tick": 104434 "tick": 104434
}, },
{
"kind": "Empty",
"from": "",
"text": "#game_spawn_as",
"tick": 104764
},
{ {
"kind": "TF_Chat_AllDead", "kind": "TF_Chat_AllDead",
"from": "freak u ___", "from": "freak u ___",
@ -802,6 +1180,18 @@ expression: state
"text": "[LogsTF] Uploading logs...", "text": "[LogsTF] Uploading logs...",
"tick": 105351 "tick": 105351
}, },
{
"kind": "Empty",
"from": "",
"text": "Recording stopped",
"tick": 105351
},
{
"kind": "Empty",
"from": "",
"text": "PUG ends with the score 3 to 5.",
"tick": 105351
},
{ {
"kind": "TF_Chat_AllDead", "kind": "TF_Chat_AllDead",
"from": "tridud", "from": "tridud",

View file

@ -16,6 +16,78 @@ expression: state
"text": "thanks", "text": "thanks",
"tick": 5000 "tick": 5000
}, },
{
"kind": "Empty",
"from": "",
"text": "[STV Stats] BLU's medic died with 100% uber",
"tick": 5328
},
{
"kind": "Empty",
"from": "",
"text": "[STV Stats] BLU spent 7.4 seconds after spawning before healing",
"tick": 6926
},
{
"kind": "Empty",
"from": "",
"text": "[STV Stats] BLU's medic died with 99% uber",
"tick": 10588
},
{
"kind": "Empty",
"from": "",
"text": "[STV Stats] BLU spent 9.0 seconds after spawning before healing",
"tick": 28546
},
{
"kind": "Empty",
"from": "",
"text": "[STV Stats] RED spent 11.4 seconds after spawning before healing",
"tick": 28786
},
{
"kind": "Empty",
"from": "",
"text": "[STV Stats] RED's medic died with 100% uber",
"tick": 33083
},
{
"kind": "Empty",
"from": "",
"text": "[STV Stats] RED spent 17.0 seconds after spawning before healing",
"tick": 35446
},
{
"kind": "Empty",
"from": "",
"text": "[STV Stats] RED's medic died with 100% uber",
"tick": 40339
},
{
"kind": "Empty",
"from": "",
"text": "[STV Stats] RED spent 11.3 seconds after spawning before healing",
"tick": 42406
},
{
"kind": "Empty",
"from": "",
"text": "[STV Stats] BLU spent 19.4 seconds after spawning before healing",
"tick": 44226
},
{
"kind": "Empty",
"from": "",
"text": "[STV Stats] BLU's medic died with 100% uber",
"tick": 47735
},
{
"kind": "Empty",
"from": "",
"text": "[STV Stats] RED had uber for 35 seconds before using it",
"tick": 61463
},
{ {
"kind": "TF_Chat_All", "kind": "TF_Chat_All",
"from": "master race", "from": "master race",
@ -28,6 +100,12 @@ expression: state
"text": "gr", "text": "gr",
"tick": 62805 "tick": 62805
}, },
{
"kind": "Empty",
"from": "",
"text": "[STV Stats] RED spent 8.5 seconds after spawning before healing",
"tick": 66293
},
{ {
"kind": "TF_Chat_AllDead", "kind": "TF_Chat_AllDead",
"from": "Donald Stump", "from": "Donald Stump",
@ -105,6 +183,12 @@ expression: state
"from": "", "from": "",
"text": "[LogsTF] Uploading logs...", "text": "[LogsTF] Uploading logs...",
"tick": 80333 "tick": 80333
},
{
"kind": "Empty",
"from": "",
"text": "[SOAP] Plugins reloaded.",
"tick": 80333
} }
], ],
"users": { "users": {

View file

@ -10,6 +10,12 @@ expression: state
"text": "[P-REC] Recording...", "text": "[P-REC] Recording...",
"tick": 110 "tick": 110
}, },
{
"kind": "Empty",
"from": "",
"text": "#TF_TeamsSwitched",
"tick": 110
},
{ {
"kind": "TF_Chat_All", "kind": "TF_Chat_All",
"from": "[GC]Kimo [DK]", "from": "[GC]Kimo [DK]",
@ -352,6 +358,12 @@ expression: state
"text": "gj", "text": "gj",
"tick": 39077 "tick": 39077
}, },
{
"kind": "Empty",
"from": "",
"text": "#TF_TeamsSwitched",
"tick": 39153
},
{ {
"kind": "TF_Chat_All", "kind": "TF_Chat_All",
"from": "[GC]Coféeee", "from": "[GC]Coféeee",

View file

@ -136,6 +136,12 @@ expression: state
"text": "gr", "text": "gr",
"tick": 36278 "tick": 36278
}, },
{
"kind": "Empty",
"from": "",
"text": "#TF_TeamsSwitched",
"tick": 36300
},
{ {
"kind": "TF_Chat_All", "kind": "TF_Chat_All",
"from": "Pride | Mafia Boss", "from": "Pride | Mafia Boss",

View file

@ -3,7 +3,14 @@ source: tests/tests.rs
expression: state expression: state
--- ---
{ {
"chat": [], "chat": [
{
"kind": "Empty",
"from": "",
"text": "#TF_timeleft",
"tick": 4
}
],
"users": { "users": {
"2": { "2": {
"classes": {}, "classes": {},