Fix ipv6
This commit is contained in:
parent
0fe0b925aa
commit
6f32ee51ef
|
@ -54,6 +54,7 @@ class DataCenter
|
||||||
$test = $settings['test_mode'] ? 'test' : 'main';
|
$test = $settings['test_mode'] ? 'test' : 'main';
|
||||||
$ipv6 = $settings['ipv6'] ? 'ipv6' : 'ipv4';
|
$ipv6 = $settings['ipv6'] ? 'ipv6' : 'ipv4';
|
||||||
$address = $this->dclist[$test][$ipv6][$dc_number]['ip_address'];
|
$address = $this->dclist[$test][$ipv6][$dc_number]['ip_address'];
|
||||||
|
$address = $settings['ipv6'] ? '['.$address.']' : $address;
|
||||||
$port = $this->dclist[$test][$ipv6][$dc_number]['port'];
|
$port = $this->dclist[$test][$ipv6][$dc_number]['port'];
|
||||||
if ($settings['protocol'] == 'https') {
|
if ($settings['protocol'] == 'https') {
|
||||||
$subdomain = $this->dclist['ssl_subdomains'][$dc_number].($settings['upload'] ? '-1' : '');
|
$subdomain = $this->dclist['ssl_subdomains'][$dc_number].($settings['upload'] ? '-1' : '');
|
||||||
|
|
|
@ -455,7 +455,7 @@ trait UpdateHandler
|
||||||
$update['message']['out'] = true;
|
$update['message']['out'] = true;
|
||||||
}
|
}
|
||||||
\danog\MadelineProto\Logger::log('Saving an update of type '.$update['_'].'...');
|
\danog\MadelineProto\Logger::log('Saving an update of type '.$update['_'].'...');
|
||||||
if ($this->settings['pwr']['strict']) {
|
if (isset($this->settings['pwr']['strict']) && $this->settings['pwr']['strict']) {
|
||||||
$this->pwr_update_handler($update);
|
$this->pwr_update_handler($update);
|
||||||
} else {
|
} else {
|
||||||
$this->settings['updates']['callback']($update);
|
$this->settings['updates']['callback']($update);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user