Disable self challenging

This commit is contained in:
hgw 2023-10-04 23:24:43 +00:00
parent d9ed7bd501
commit 1c41a201a8
Signed by: hgw
SSH Key Fingerprint: SHA256:diG7RVYHjd3aDYkZWHYcBJbImu+6zfptuUP+3k/wol4

View File

@ -773,7 +773,10 @@ fn challenge(
if let Err(e) = check_idle(&fight.status) { if let Err(e) = check_idle(&fight.status) {
return Err(e); return Err(e);
} }
if arguments[0] == prefix.nick {
return Err("you can't challenge yourself nigga.".to_owned())
}
fight.status = FightStatus::WaitingWho; fight.status = FightStatus::WaitingWho;
fight.channel = channel.to_owned(); fight.channel = channel.to_owned();
fight.kind = FightKind::DeathMatch; fight.kind = FightKind::DeathMatch;