From 738d2c20860509c452c395a3fd59a6eca4ce612f Mon Sep 17 00:00:00 2001 From: EnumDev Date: Sun, 15 Feb 2026 19:42:18 +0200 Subject: [PATCH] Disale local IP module if no ip is available --- src/modules.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/modules.go b/src/modules.go index 5405cd5..800375c 100644 --- a/src/modules.go +++ b/src/modules.go @@ -358,6 +358,11 @@ func initializeModuleMap() { localIpModule := StormfetchModule{stormfetchModuleConfig: stormfetchModuleConfig{Name: "local_ip", Format: "%3Local IP: %4$LOCAL_IP"}, Execute: func(sm StormfetchModule) string { localIP := GetLocalIP() + // Return empty string if local IP is unavailable + if localIP == "Unknown" { + return "" + } + return os.Expand(sm.Format, func(s string) string { switch s { case "LOCAL_IP":