From 14b171b1c3beb8c92e83a778ba6e2fefaa0773db Mon Sep 17 00:00:00 2001 From: wrk Date: Sat, 10 Jun 2023 02:06:37 +0200 Subject: [PATCH] hall of fame only on deathmatches --- src/main.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index c5261ea..daa9ed9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -327,7 +327,9 @@ fn fight( .text(" <- !") .to_string(), ); - hall_of_fame.add_winner(&winners[0].nick); + if fight.kind == FightKind::DeathMatch { + hall_of_fame.add_winner(&winners[0].nick); + } } else { ctx.privmsg( &fight.channel, @@ -349,7 +351,9 @@ fn fight( .text(" <-") .to_string(), ); - hall_of_fame.add_winner(&w.nick); + if fight.kind == FightKind::DeathMatch { + hall_of_fame.add_winner(&w.nick); + } } } @@ -445,10 +449,11 @@ fn fight( .text(" is lying dead!") .to_string(), ); - hall_of_fame.add_fucking_looser(&fucking_victim.nick); ctx.mode(&fight.channel, &format!("-v {}", fucking_victim.nick)); if fight.kind == FightKind::DeathMatch { + hall_of_fame.add_fucking_looser(&fucking_victim.nick); + ctx.privmsg( "ChanServ", &format!(