user_to) !== 'ping') return FALSE; $reply = sprintf("Your ping was received here on %s and it took %s to get here.\n", Carbon::now()->toDateTimeString(), $msg->date->diffForHumans(['parts'=>3,'syntax'=>CarbonInterface::DIFF_ABSOLUTE]) ); $reply .= "\n"; $reply .= "Your message travelled along this path to get here:\n"; foreach ($msg->via as $path) $reply .= sprintf(" * %s\n",$path); $o = new Netmail(); $o->to = $msg->user_from; $o->from = Setup::PRODUCT_NAME; $o->subject = 'Ping Reply'; $o->fftn_id = ($x=$msg->tftn_o) ? $x->id : NULL; $o->tftn_id = ($x=$msg->fftn_o) ? $x->id : NULL; $o->msg = static::format_msg($reply); $o->reply = $msg->msgid; $o->tagline = '... My ping pong opponent was not happy with my serve. He kept returning it.'; $o->tearline = sprintf('--- %s (%s)',Setup::PRODUCT_NAME,(new Setup)->version); $o->save(); return TRUE; } }