From 1f1127881565dda8ab06c86102d9bbbc8c4b6e99 Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Fri, 17 Feb 2023 10:57:55 +0800 Subject: [PATCH] feat(hack): hack success message --- web/app/controllers/judge/submit.php | 9 +++++++++ web/app/models/UOJSubmissionLikeTrait.php | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/web/app/controllers/judge/submit.php b/web/app/controllers/judge/submit.php index b8ed8e3..51c7753 100644 --- a/web/app/controllers/judge/submit.php +++ b/web/app/controllers/judge/submit.php @@ -57,6 +57,15 @@ function hackJudged() { if (!$result['score']) { return; + } else { + $problem_link = UOJHack::cur()->problem->getLink(); + $submission_link = UOJHack::cur()->submission->getLink(); + $hacker_link = UOJUser::getLink(UOJHack::info('hacker'), ['color' => false]); + $hack_link = UOJHack::cur()->getLink(); + + sendSystemMsg(UOJHack::info('owner'), '提交被 Hack 通知', <<info['id']; } public function getLink() { - return '#' . $this->info['id'] . ''; + return '#' . $this->info['id'] . ''; } public function getResult($key = null) {