diff --git a/core/core.go b/core/core.go index 938b83cba..3d3010b9c 100644 --- a/core/core.go +++ b/core/core.go @@ -63,9 +63,7 @@ func Start() error { return err } - if data.GetDirectoryEnabled() { - _yp = yp.NewYP(GetStatus) - } + _yp = yp.NewYP(GetStatus) chat.Setup(ChatListenerImpl{}) diff --git a/yp/yp.go b/yp/yp.go index 2fd8955b2..7f7102fd5 100644 --- a/yp/yp.go +++ b/yp/yp.go @@ -60,6 +60,10 @@ func (yp *YP) Stop() { } func (yp *YP) ping() { + if !data.GetDirectoryEnabled() { + return + } + myInstanceURL := data.GetServerURL() if myInstanceURL == "" { log.Warnln("Server URL not set in the configuration. Directory access is disabled until this is set.")