Skip to content

Commit

Permalink
GH-150 Simplify messaging
Browse files Browse the repository at this point in the history
  • Loading branch information
mdziekon committed Mar 22, 2022
1 parent 2b78709 commit b0c7f26
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions reg_ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,13 @@ function handleRegistration(&$input) {
'existingMatchingEnterLogIds' => $existingMatchingEnterLogIds,
]);

$Message = false;
$Message['msg_id'] = '038';
$Message['args'] = array('');
$Message = json_encode($Message);
// Send a message to the referring player
$referringPlayerNotificationMsg = [
'msg_id' => '038',
'args' => [],
];

SendSimpleMessage($referrerUserId, 0, $Now, 70, '007', '016', $Message);
SendSimpleMessage($referrerUserId, 0, $Now, 70, '007', '016', json_encode($referringPlayerNotificationMsg));
}

$ActivationCode = md5(mt_rand(0, 99999999999));
Expand All @@ -222,13 +223,15 @@ function handleRegistration(&$input) {
)
]);

// Send a invitation private msg
$Message = false;
$Message['msg_id'] = '022';
$Message['args'] = array('');
$Message = json_encode($Message);
// Send welcome private msg to the new player
$newPlayerWelcomeMessage = [
'msg_id' => '022',
'args' => [
''
],
];

SendSimpleMessage($UserID, 0, $Now, 70, '004', '009', $Message);
SendSimpleMessage($UserID, 0, $Now, 70, '004', '009', json_encode($newPlayerWelcomeMessage));

if (REGISTER_REQUIRE_EMAILCONFIRM) {
include($_EnginePath.'includes/functions/SendMail.php');
Expand Down

0 comments on commit b0c7f26

Please sign in to comment.