외교권자에게는 메시지를 보낼 수 없음

This commit is contained in:
2019-04-07 22:30:00 +09:00
parent 23c2a16286
commit f4d6803720
4 changed files with 37 additions and 12 deletions
+11 -2
View File
@@ -150,8 +150,8 @@ if($mailbox > 0) {
$session->lastMsg = $now->format('Y-m-d H:i:s');
$destUser = $db->queryFirstRow('SELECT `no`,`name`,`nation`,`con`,`picture`,`imgsvr` FROM general WHERE `no`=%i',$mailbox);
$destUser = $db->queryFirstRow('SELECT `no`,`name`,`nation`,`level`,`con`,`picture`,`imgsvr`,permission,penalty FROM general WHERE `no`=%i',$mailbox);
if(!$destUser){
Json::die([
'result' => false,
@@ -160,6 +160,15 @@ if($mailbox > 0) {
]);
}
$destPermission = checkSecretPermission($destUser, false);
if($permission == 4 && $destPermission == 4){
Json::die([
'result' => false,
'reason' => '외교권자끼리는 메시지를 보낼 수 없습니다.',
'msgID' => null
]);
}
$destNation = getNationStaticInfo($destUser['nation']);
$dest = new MessageTarget(