Skip to content

Commit

Permalink
can't partner yourself
Browse files Browse the repository at this point in the history
  • Loading branch information
mia-pi-git committed May 2, 2024
1 parent 74ce64c commit 4c39e01
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/chat-commands/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1425,6 +1425,9 @@ export const commands: Chat.ChatCommands = {
if (targetUser.locked && !user.locked) {
return this.popupReply(`That user is locked and cannot be invited to battles.`);
}
if (targetUser.id === user.id) {
return this.popupReply(`You cannot be your own partner.`);
}
if (user.locked && !targetUser.locked) {
return this.errorReply(`You are locked and cannot invite others to battles.`);
}
Expand Down

0 comments on commit 4c39e01

Please sign in to comment.