False ip check

This commit is contained in:
jhartworks
2026-04-11 12:45:54 +02:00
parent 5a892e12f1
commit f2a35e1eff
3 changed files with 279 additions and 277 deletions
+4 -2
View File
@@ -283,8 +283,7 @@ class AwtrixSettings extends IPSModule {
}
public function SendSetting() {
if (!$this->CheckIP()) {
// Discord webhook URL
if ($this->CheckIP()) {
$awtrixIp = $this->ReadPropertyString("AwtrixIp");
$url="http://{$awtrixIp}/api/settings";
@@ -543,13 +542,16 @@ class AwtrixSettings extends IPSModule {
if ($http_code == 200) {
return true;
$this->SetStatus(102);
IPS_LogMessage("AWTRIX","Status 102");
} else {
return false;
$this->SetStatus(104);
IPS_LogMessage("AWTRIX","Status 104");
}
} else {
return false;
$this->SetStatus(104);
IPS_LogMessage("AWTRIX","Status 104 END");
}
}