From 9a3cb7dc5cddaff2537e5dbe3461ff6f060ccf21 Mon Sep 17 00:00:00 2001 From: Martin Ambrus Date: Tue, 7 Nov 2017 19:17:39 +0100 Subject: [PATCH] feat: send alliance invite to in-game messages Closes #277 --- GameEngine/Alliance.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/GameEngine/Alliance.php b/GameEngine/Alliance.php index 9d3be090..3be8e244 100755 --- a/GameEngine/Alliance.php +++ b/GameEngine/Alliance.php @@ -151,6 +151,18 @@ class Alliance { $database->sendInvitation($UserData['id'], $aid, $session->uid); // Log the notice $database->insertAlliNotice($session->alliance, '' . addslashes($session->username) . ' has invited ' . addslashes($UserData['username']) . ' into the alliance.'); + // send invitation via in-game messages + $database->sendMessage( + $UserData['id'], + 2, + 'Alliance invitation.', + $database->escape("Hi, ".$UserData['username']."!\n\nThis is to inform you that you have been invited to join an alliance. To accept this invitation, please visit your Embassy.\n\nYours sincerely,\nServer Robot :)"), + 0, + 0, + 0, + 0, + 0, + true); } }else{ header("Location: banned.php");