From 81d8cd0868fbac2473c31ea553d781f2a12b7c43 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Thu, 10 May 2018 10:36:09 +0000 Subject: [PATCH] Improve self-update and add copyright notice --- mtproxyd | 2 +- phar.php | 18 ++++++++++++++++-- src/danog/MadelineProto/Logger.php | 13 +++++++++++++ 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/mtproxyd b/mtproxyd index f46e1ff43..fbbc96d69 100755 --- a/mtproxyd +++ b/mtproxyd @@ -6,7 +6,7 @@ $debug = false; // Set this to true to avoid automatic updates of this script -echo "Powered by MadelineProto, licensed under AGPLv3\n\n"; +echo "mtproxyd - Copyright by Daniil Gentili, licensed under AGPLv3\n\n"; if (!isset($argv[2])) { echo "Usage: ".$argv[0]." seed port\n\nseed is any string or word that will be used as seed to generate the proxy secret\nport is the port where to start listening for connections\n"; exit(1); diff --git a/phar.php b/phar.php index f90c8221a..932cf7fb6 100644 --- a/phar.php +++ b/phar.php @@ -1,8 +1,22 @@ colors[self::WARNING] = implode(';', [self::foreground['white'], self::set['dim'], self::background['red']]); $this->colors[self::ERROR] = implode(';', [self::foreground['white'], self::set['bold'], self::background['red']]); $this->colors[self::FATAL_ERROR] = implode(';', [self::foreground['red'], self::set['bold'], self::background['light_gray']]); + + if (!self::$printed) { + $this->colors[self::NOTICE] = implode(';', [self::foreground['light_gray'], self::set['bold'], self::background['blue']]); + + $this->logger('MadelineProto'); + $this->logger('Copyright (C) 2016-2018 Daniil Gentili'); + $this->logger('Licensed under AGPLv3'); + $this->logger('https://github.com/danog/MadelineProto'); + + $this->colors[self::NOTICE] = implode(';', [self::foreground['yellow'], self::set['bold']]); + self::$printed = true; + } } public static function log($param, $level = self::NOTICE)