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); }