From 1c41a201a8d51a1f046341bd492ff003d735d2b7 Mon Sep 17 00:00:00 2001 From: hgw Date: Wed, 4 Oct 2023 23:24:43 +0000 Subject: [PATCH] Disable self challenging --- src/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index eee1e97..19ea557 100644 --- a/src/main.rs +++ b/src/main.rs @@ -773,7 +773,10 @@ fn challenge( if let Err(e) = check_idle(&fight.status) { return Err(e); } - + if arguments[0] == prefix.nick { + return Err("you can't challenge yourself nigga.".to_owned()) + } + fight.status = FightStatus::WaitingWho; fight.channel = channel.to_owned(); fight.kind = FightKind::DeathMatch;