Merge pull request #120 from rhansen/whitespace-fixes

This commit is contained in:
Sandro 2020-05-27 02:32:58 +02:00 committed by GitHub
commit b6b9878315
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -66,8 +66,7 @@ sub T_POSTS {'postscript'};
## strategies for obtaining an ip address. ## strategies for obtaining an ip address.
my %builtinweb = ( my %builtinweb = (
'dyndns' => { 'url' => 'http://checkip.dyndns.org/', 'skip' => 'dyndns' => { 'url' => 'http://checkip.dyndns.org/', 'skip' => 'Current IP Address:', },
'Current IP Address:', },
'loopia' => { 'url' => 'http://dns.loopia.se/checkip/checkip.php', 'skip' => 'Current IP Address:', }, 'loopia' => { 'url' => 'http://dns.loopia.se/checkip/checkip.php', 'skip' => 'Current IP Address:', },
); );
my %builtinfw = ( my %builtinfw = (
@ -3064,15 +3063,12 @@ sub nic_concont_update {
last if !header_ok($h, $reply); last if !header_ok($h, $reply);
# Response found, just declare as success (this is ugly, we need more error checking) # Response found, just declare as success (this is ugly, we need more error checking)
if ($reply =~ /SUCCESS/) if ($reply =~ /SUCCESS/) {
{
$config{$h}{'ip'} = $ip; $config{$h}{'ip'} = $ip;
$config{$h}{'mtime'} = $now; $config{$h}{'mtime'} = $now;
$config{$h}{'status'} = 'good'; $config{$h}{'status'} = 'good';
success("updating %s: good: IP address set to %s", $h, $ip); success("updating %s: good: IP address set to %s", $h, $ip);
} } else {
else
{
my @reply = split /\n/, $reply; my @reply = split /\n/, $reply;
my $returned = pop(@reply); my $returned = pop(@reply);
$config{$h}{'status'} = 'failed'; $config{$h}{'status'} = 'failed';
@ -4125,15 +4121,12 @@ sub nic_dtdns_update {
last if !header_ok($h, $reply); last if !header_ok($h, $reply);
# Response found, just declare as success (this is ugly, we need more error checking) # Response found, just declare as success (this is ugly, we need more error checking)
if ($reply =~ /now\spoints\sto/) if ($reply =~ /now\spoints\sto/) {
{
$config{$h}{'ip'} = $ip; $config{$h}{'ip'} = $ip;
$config{$h}{'mtime'} = $now; $config{$h}{'mtime'} = $now;
$config{$h}{'status'} = 'good'; $config{$h}{'status'} = 'good';
success("updating %s: good: IP address set to %s", $h, $ip); success("updating %s: good: IP address set to %s", $h, $ip);
} } else {
else
{
my @reply = split /\n/, $reply; my @reply = split /\n/, $reply;
my $returned = pop(@reply); my $returned = pop(@reply);
$config{$h}{'status'} = 'failed'; $config{$h}{'status'} = 'failed';
@ -4673,15 +4666,12 @@ sub nic_duckdns_update {
my @reply = split /\n/, $reply; my @reply = split /\n/, $reply;
my $returned = pop(@reply); my $returned = pop(@reply);
if ($returned =~ /OK/) if ($returned =~ /OK/) {
{
$config{$h}{'ip'} = $ip; $config{$h}{'ip'} = $ip;
$config{$h}{'mtime'} = $now; $config{$h}{'mtime'} = $now;
$config{$h}{'status'} = 'good'; $config{$h}{'status'} = 'good';
success("updating %s: good: IP address set to %s", $h, $ip); success("updating %s: good: IP address set to %s", $h, $ip);
} } else {
else
{
$config{$h}{'status'} = 'failed'; $config{$h}{'status'} = 'failed';
failed("updating %s: Server said: '$returned'", $h); failed("updating %s: Server said: '$returned'", $h);
} }
@ -4747,15 +4737,12 @@ sub nic_freemyip_update {
my @reply = split /\n/, $reply; my @reply = split /\n/, $reply;
my $returned = pop(@reply); my $returned = pop(@reply);
if ($returned =~ /OK/) if ($returned =~ /OK/) {
{
$config{$h}{'ip'} = $ip; $config{$h}{'ip'} = $ip;
$config{$h}{'mtime'} = $now; $config{$h}{'mtime'} = $now;
$config{$h}{'status'} = 'good'; $config{$h}{'status'} = 'good';
success("updating %s: good: IP address set to %s", $h, $ip); success("updating %s: good: IP address set to %s", $h, $ip);
} } else {
else
{
$config{$h}{'status'} = 'failed'; $config{$h}{'status'} = 'failed';
failed("updating %s: Server said: '$returned'", $h); failed("updating %s: Server said: '$returned'", $h);
} }
@ -5085,15 +5072,12 @@ sub nic_dnsmadeeasy_update {
my @reply = split /\n/, $reply; my @reply = split /\n/, $reply;
my $returned = pop(@reply); my $returned = pop(@reply);
if ($returned =~ 'success') if ($returned =~ 'success') {
{
$config{$h}{'ip'} = $ip; $config{$h}{'ip'} = $ip;
$config{$h}{'mtime'} = $now; $config{$h}{'mtime'} = $now;
$config{$h}{'status'} = 'good'; $config{$h}{'status'} = 'good';
success("Updating %s: good: IP address set to %s", $h, $ip); success("Updating %s: good: IP address set to %s", $h, $ip);
} } else {
else
{
$config{$h}{'status'} = 'failed'; $config{$h}{'status'} = 'failed';
failed("Updating %s: Server said: '$returned': $messages{$returned}", $h); failed("Updating %s: Server said: '$returned': $messages{$returned}", $h);
} }