diff --git a/znc.cpp b/znc.cpp index b4e9e56a..0c9782e5 100644 --- a/znc.cpp +++ b/znc.cpp @@ -1989,6 +1989,11 @@ protected: const map& mUsers = CZNC::Get().GetUserMap(); map::const_iterator it = mUsers.begin(); + if (CZNC::Get().IsISpoofLocked()) { + // Meh, gotta retry later + return; + } + uiUserCount = CZNC::Get().GetUserMap().size(); if (m_uiPosNextUser >= uiUserCount) { diff --git a/znc.h b/znc.h index 5b334975..414d4aeb 100644 --- a/znc.h +++ b/znc.h @@ -37,6 +37,7 @@ public: void Loop(); bool WriteISpoof(CUser* pUser); void ReleaseISpoof(); + bool IsISpoofLocked() { return m_pISpoofLockFile != NULL; } bool WritePidFile(int iPid); bool DeletePidFile(); bool WaitForChildLock();