Skip to content

Commit 3fade19

Browse files
committed
cmdhandler.d: require entering username when deleting account
1 parent 256f8ed commit 3fade19

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/server/cmdhandler.d

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,13 @@ final class CommandHandler
6565
break;
6666

6767
case "deleteaccount":
68-
if (args.length < 2 || args.length > 2 || args[1] != "confirm") {
68+
if (command != text("deleteaccount confirm ", sender_username)) {
6969
server.send_pm(
7070
server_username, sender_username,
71-
"Type 'deleteaccount confirm' to delete your account"
71+
text(
72+
"Type 'deleteaccount confirm ", sender_username,
73+
"' to delete your account"
74+
)
7275
);
7376
break;
7477
}

0 commit comments

Comments
 (0)