From 979f2651f3496da651e21c0e6b5dad12d49dc613 Mon Sep 17 00:00:00 2001 From: psychon Date: Thu, 18 Dec 2008 16:22:31 +0000 Subject: [PATCH] Add some API to CModule This let's module have access to all their active timers/sockets. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1293 726aef4b-f618-498e-8847-2d620e286838 --- Modules.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Modules.h b/Modules.h index 4ae30280..7f591898 100644 --- a/Modules.h +++ b/Modules.h @@ -303,6 +303,8 @@ public: bool RemTimer(const CString& sLabel); bool UnlinkTimer(CTimer* pTimer); CTimer* FindTimer(const CString& sLabel); + vector::const_iterator BeginTimers() const { return m_vTimers.begin(); } + vector::const_iterator EndTimers() const { return m_vTimers.end(); } virtual void ListTimers(); // !Timer stuff @@ -312,6 +314,8 @@ public: bool RemSocket(const CString& sSockName); bool UnlinkSocket(CSocket* pSocket); CSocket* FindSocket(const CString& sSockName); + vector::const_iterator BeginSockets() const { return m_vSockets.begin(); } + vector::const_iterator EndSockets() const { return m_vSockets.end(); } virtual void ListSockets(); // !Socket stuff