From 06d88d3fe511584e9210d7e2290676b6e85bbc5c Mon Sep 17 00:00:00 2001 From: hide_d Date: Sat, 26 Jan 2019 03:50:08 +0900 Subject: [PATCH] =?UTF-8?q?=EC=99=B8=EA=B5=90=20=EB=A9=94=EC=8B=9C?= =?UTF-8?q?=EC=A7=80=20=EC=A0=84=EC=86=A1=EC=8B=9C=20=EC=95=8C=EB=A6=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/index.php | 2 +- hwe/sammo/Message.php | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/hwe/index.php b/hwe/index.php index c4d6704c..5797bab0 100644 --- a/hwe/index.php +++ b/hwe/index.php @@ -328,7 +328,7 @@ if ($con == 1) { MessageBox("접속제한이 얼마 남지 않았습니다!"); } if ($me['newmsg'] == 1) { - MessageBox("개인 서신이 도착했습니다!"); + MessageBox("새로운 서신이 도착했습니다!"); } if ($me['newvote'] == 1) { $develcost = $admin['develcost']*5; diff --git a/hwe/sammo/Message.php b/hwe/sammo/Message.php index c1b6e086..157e1ad3 100644 --- a/hwe/sammo/Message.php +++ b/hwe/sammo/Message.php @@ -387,7 +387,17 @@ class Message return $this->sendRaw($this->dest->generalID); } - if($this->msgType === self::MSGTYPE_NATIONAL || $this->msgType === self::MSGTYPE_DIPLOMACY){ + if($this->msgType === self::MSGTYPE_NATIONAL){ + return $this->sendRaw($this->dest->nationID + self::MAILBOX_NATIONAL); + } + + if($this->msgType === self::MSGTYPE_DIPLOMACY){ + if(!($this->msgOption['silence']??false)){ + //XXX: 알림을 이런식으로 보내는게 맞는가에 대한 의문 있음 + DB::db()->update('general', [ + 'newmsg'=>1 + ], 'nation = %i AND (level = 12 OR permission IN (\'ambassador\', \'auditor\')) ',$this->dest->nationID); + } return $this->sendRaw($this->dest->nationID + self::MAILBOX_NATIONAL); }