From 2d4a319d961e3f9e6aa9f7926f9ed320d72de8da Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 19 Jul 2008 23:48:06 +0000 Subject: Fix total mess of makefile dependency macros (all depending on stuff they dont NEED to depend on) and fix includes in all of m_spanningtree (everything including just about everything, doesnt need to) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10046 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/cachetimer.cpp | 39 +++++++++++++++++++++++++ src/modules/m_spanningtree/cachetimer.h | 37 +++++++++++++++++++++++ src/modules/m_spanningtree/hmac.cpp | 2 +- src/modules/m_spanningtree/main.cpp | 4 +-- src/modules/m_spanningtree/override_admin.cpp | 7 +---- src/modules/m_spanningtree/override_modules.cpp | 7 +---- src/modules/m_spanningtree/override_motd.cpp | 7 +---- src/modules/m_spanningtree/override_squit.cpp | 7 +---- src/modules/m_spanningtree/override_stats.cpp | 6 +--- src/modules/m_spanningtree/override_time.cpp | 7 +---- src/modules/m_spanningtree/override_whois.cpp | 7 +---- src/modules/m_spanningtree/ping.cpp | 5 +--- src/modules/m_spanningtree/pong.cpp | 5 +--- src/modules/m_spanningtree/postcommand.cpp | 7 +---- src/modules/m_spanningtree/precommand.cpp | 7 +---- src/modules/m_spanningtree/push.cpp | 5 +--- src/modules/m_spanningtree/rconnect.cpp | 3 +- src/modules/m_spanningtree/resolvers.cpp | 2 +- src/modules/m_spanningtree/rsquit.cpp | 5 +--- src/modules/m_spanningtree/server.cpp | 6 ++-- src/modules/m_spanningtree/stats.cpp | 4 +-- src/modules/m_spanningtree/svsjoin.cpp | 5 +--- src/modules/m_spanningtree/svsnick.cpp | 5 +--- src/modules/m_spanningtree/svspart.cpp | 5 +--- src/modules/m_spanningtree/time.cpp | 5 +--- src/modules/m_spanningtree/timesynctimer.cpp | 39 ------------------------- src/modules/m_spanningtree/timesynctimer.h | 37 ----------------------- src/modules/m_spanningtree/treesocket1.cpp | 2 +- src/modules/m_spanningtree/treesocket2.cpp | 2 +- src/modules/m_spanningtree/uid.cpp | 2 +- src/modules/m_spanningtree/utils.cpp | 2 +- src/modules/m_spanningtree/version.cpp | 5 +--- src/modules/m_spanningtree/whois.cpp | 5 +--- 33 files changed, 107 insertions(+), 186 deletions(-) create mode 100644 src/modules/m_spanningtree/cachetimer.cpp create mode 100644 src/modules/m_spanningtree/cachetimer.h delete mode 100644 src/modules/m_spanningtree/timesynctimer.cpp delete mode 100644 src/modules/m_spanningtree/timesynctimer.h (limited to 'src') diff --git a/src/modules/m_spanningtree/cachetimer.cpp b/src/modules/m_spanningtree/cachetimer.cpp new file mode 100644 index 000000000..71214dcfa --- /dev/null +++ b/src/modules/m_spanningtree/cachetimer.cpp @@ -0,0 +1,39 @@ +/* +------------------------------------+ + * | Inspire Internet Relay Chat Daemon | + * +------------------------------------+ + * + * InspIRCd: (C) 2002-2008 InspIRCd Development Team + * See: http://www.inspircd.org/wiki/index.php/Credits + * + * This program is free but copyrighted software; see + * the file COPYING for details. + * + * --------------------------------------------------- + */ + +#include "inspircd.h" +#include "commands/cmd_whois.h" +#include "commands/cmd_stats.h" +#include "socket.h" +#include "wildcard.h" +#include "xline.h" +#include "transport.h" + +#include "m_spanningtree/cachetimer.h" +#include "m_spanningtree/main.h" +#include "m_spanningtree/utils.h" +#include "m_spanningtree/treeserver.h" +#include "m_spanningtree/link.h" +#include "m_spanningtree/treesocket.h" + +/* $ModDep: m_spanningtree/cachetimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h */ + +CacheRefreshTimer::CacheRefreshTimer(InspIRCd *Inst, SpanningTreeUtilities *Util) : Timer(3600, Inst->Time(), true), Instance(Inst), Utils(Util) +{ +} + +void CacheRefreshTimer::Tick(time_t TIME) +{ + Utils->RefreshIPCache(); +} + diff --git a/src/modules/m_spanningtree/cachetimer.h b/src/modules/m_spanningtree/cachetimer.h new file mode 100644 index 000000000..3f97255b3 --- /dev/null +++ b/src/modules/m_spanningtree/cachetimer.h @@ -0,0 +1,37 @@ +/* +------------------------------------+ + * | Inspire Internet Relay Chat Daemon | + * +------------------------------------+ + * + * InspIRCd: (C) 2002-2008 InspIRCd Development Team + * See: http://www.inspircd.org/wiki/index.php/Credits + * + * This program is free but copyrighted software; see + * the file COPYING for details. + * + * --------------------------------------------------- + */ + +#ifndef __TIMESYNC_H__ +#define __TIMESYNC_H__ + +#include "timer.h" + +class ModuleSpanningTree; +class SpanningTreeUtilities; +class InspIRCd; + +/** Create a timer which recurs every second, we inherit from Timer. + * Timer is only one-shot however, so at the end of each Tick() we simply + * insert another of ourselves into the pending queue :) + */ +class CacheRefreshTimer : public Timer +{ + private: + InspIRCd *Instance; + SpanningTreeUtilities *Utils; + public: + CacheRefreshTimer(InspIRCd *Instance, SpanningTreeUtilities* Util); + virtual void Tick(time_t TIME); +}; + +#endif diff --git a/src/modules/m_spanningtree/hmac.cpp b/src/modules/m_spanningtree/hmac.cpp index 564bef796..7744ab217 100644 --- a/src/modules/m_spanningtree/hmac.cpp +++ b/src/modules/m_spanningtree/hmac.cpp @@ -29,7 +29,7 @@ #include "m_spanningtree/resolvers.h" #include "m_spanningtree/handshaketimer.h" -/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_hash.h */ +/* $ModDep: m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_hash.h */ const std::string& TreeSocket::GetOurChallenge() { diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index 91c13e559..2abb780a7 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -21,7 +21,7 @@ #include "xline.h" #include "transport.h" -#include "m_spanningtree/timesynctimer.h" +#include "m_spanningtree/cachetimer.h" #include "m_spanningtree/resolvers.h" #include "m_spanningtree/main.h" #include "m_spanningtree/utils.h" @@ -32,7 +32,7 @@ #include "m_spanningtree/rsquit.h" #include "m_spanningtree/protocolinterface.h" -/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_spanningtree/rconnect.h m_spanningtree/rsquit.h m_spanningtree/protocolinterface.h */ +/* $ModDep: m_spanningtree/cachetimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_spanningtree/rconnect.h m_spanningtree/rsquit.h m_spanningtree/protocolinterface.h */ ModuleSpanningTree::ModuleSpanningTree(InspIRCd* Me) : Module(Me), max_local(0), max_global(0) diff --git a/src/modules/m_spanningtree/override_admin.cpp b/src/modules/m_spanningtree/override_admin.cpp index 95b0c8432..3a4aa2a1f 100644 --- a/src/modules/m_spanningtree/override_admin.cpp +++ b/src/modules/m_spanningtree/override_admin.cpp @@ -21,17 +21,12 @@ #include "xline.h" #include "transport.h" -#include "m_spanningtree/timesynctimer.h" -#include "m_spanningtree/resolvers.h" #include "m_spanningtree/main.h" #include "m_spanningtree/utils.h" #include "m_spanningtree/treeserver.h" -#include "m_spanningtree/link.h" #include "m_spanningtree/treesocket.h" -#include "m_spanningtree/rconnect.h" -#include "m_spanningtree/rsquit.h" -/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_spanningtree/rconnect.h m_spanningtree/rsquit.h */ +/* $ModDep: m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h */ int ModuleSpanningTree::HandleAdmin(const std::vector& parameters, User* user) { diff --git a/src/modules/m_spanningtree/override_modules.cpp b/src/modules/m_spanningtree/override_modules.cpp index 8d9034eca..1d33d104e 100644 --- a/src/modules/m_spanningtree/override_modules.cpp +++ b/src/modules/m_spanningtree/override_modules.cpp @@ -21,17 +21,12 @@ #include "xline.h" #include "transport.h" -#include "m_spanningtree/timesynctimer.h" -#include "m_spanningtree/resolvers.h" #include "m_spanningtree/main.h" #include "m_spanningtree/utils.h" #include "m_spanningtree/treeserver.h" -#include "m_spanningtree/link.h" #include "m_spanningtree/treesocket.h" -#include "m_spanningtree/rconnect.h" -#include "m_spanningtree/rsquit.h" -/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_spanningtree/rconnect.h m_spanningtree/rsquit.h */ +/* $ModDep: m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h */ int ModuleSpanningTree::HandleModules(const std::vector& parameters, User* user) { diff --git a/src/modules/m_spanningtree/override_motd.cpp b/src/modules/m_spanningtree/override_motd.cpp index ee90026cc..e689be1f7 100644 --- a/src/modules/m_spanningtree/override_motd.cpp +++ b/src/modules/m_spanningtree/override_motd.cpp @@ -21,17 +21,12 @@ #include "xline.h" #include "transport.h" -#include "m_spanningtree/timesynctimer.h" -#include "m_spanningtree/resolvers.h" #include "m_spanningtree/main.h" #include "m_spanningtree/utils.h" #include "m_spanningtree/treeserver.h" -#include "m_spanningtree/link.h" #include "m_spanningtree/treesocket.h" -#include "m_spanningtree/rconnect.h" -#include "m_spanningtree/rsquit.h" -/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_spanningtree/rconnect.h m_spanningtree/rsquit.h */ +/* $ModDep: m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h */ int ModuleSpanningTree::HandleMotd(const std::vector& parameters, User* user) { diff --git a/src/modules/m_spanningtree/override_squit.cpp b/src/modules/m_spanningtree/override_squit.cpp index cacbc51a6..812424c81 100644 --- a/src/modules/m_spanningtree/override_squit.cpp +++ b/src/modules/m_spanningtree/override_squit.cpp @@ -21,17 +21,12 @@ #include "xline.h" #include "transport.h" -#include "m_spanningtree/timesynctimer.h" -#include "m_spanningtree/resolvers.h" #include "m_spanningtree/main.h" #include "m_spanningtree/utils.h" #include "m_spanningtree/treeserver.h" -#include "m_spanningtree/link.h" #include "m_spanningtree/treesocket.h" -#include "m_spanningtree/rconnect.h" -#include "m_spanningtree/rsquit.h" -/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_spanningtree/rconnect.h m_spanningtree/rsquit.h */ +/* $ModDep: m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h */ int ModuleSpanningTree::HandleSquit(const std::vector& parameters, User* user) { diff --git a/src/modules/m_spanningtree/override_stats.cpp b/src/modules/m_spanningtree/override_stats.cpp index 6c66e2d2b..d6ae89e4d 100644 --- a/src/modules/m_spanningtree/override_stats.cpp +++ b/src/modules/m_spanningtree/override_stats.cpp @@ -21,17 +21,13 @@ #include "xline.h" #include "transport.h" -#include "m_spanningtree/timesynctimer.h" -#include "m_spanningtree/resolvers.h" #include "m_spanningtree/main.h" #include "m_spanningtree/utils.h" #include "m_spanningtree/treeserver.h" #include "m_spanningtree/link.h" #include "m_spanningtree/treesocket.h" -#include "m_spanningtree/rconnect.h" -#include "m_spanningtree/rsquit.h" -/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_spanningtree/rconnect.h m_spanningtree/rsquit.h */ +/* $ModDep: m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h */ int ModuleSpanningTree::HandleStats(const std::vector& parameters, User* user) { diff --git a/src/modules/m_spanningtree/override_time.cpp b/src/modules/m_spanningtree/override_time.cpp index 9f298c5f0..882607161 100644 --- a/src/modules/m_spanningtree/override_time.cpp +++ b/src/modules/m_spanningtree/override_time.cpp @@ -21,17 +21,12 @@ #include "xline.h" #include "transport.h" -#include "m_spanningtree/timesynctimer.h" -#include "m_spanningtree/resolvers.h" #include "m_spanningtree/main.h" #include "m_spanningtree/utils.h" #include "m_spanningtree/treeserver.h" -#include "m_spanningtree/link.h" #include "m_spanningtree/treesocket.h" -#include "m_spanningtree/rconnect.h" -#include "m_spanningtree/rsquit.h" -/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_spanningtree/rconnect.h m_spanningtree/rsquit.h */ +/* $ModDep: m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h */ int ModuleSpanningTree::HandleTime(const std::vector& parameters, User* user) { diff --git a/src/modules/m_spanningtree/override_whois.cpp b/src/modules/m_spanningtree/override_whois.cpp index a957ee174..d10298348 100644 --- a/src/modules/m_spanningtree/override_whois.cpp +++ b/src/modules/m_spanningtree/override_whois.cpp @@ -21,17 +21,12 @@ #include "xline.h" #include "transport.h" -#include "m_spanningtree/timesynctimer.h" -#include "m_spanningtree/resolvers.h" #include "m_spanningtree/main.h" #include "m_spanningtree/utils.h" #include "m_spanningtree/treeserver.h" -#include "m_spanningtree/link.h" #include "m_spanningtree/treesocket.h" -#include "m_spanningtree/rconnect.h" -#include "m_spanningtree/rsquit.h" -/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_spanningtree/rconnect.h m_spanningtree/rsquit.h */ +/* $ModDep: m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h */ int ModuleSpanningTree::HandleRemoteWhois(const std::vector& parameters, User* user) { diff --git a/src/modules/m_spanningtree/ping.cpp b/src/modules/m_spanningtree/ping.cpp index df708026e..a4a188665 100644 --- a/src/modules/m_spanningtree/ping.cpp +++ b/src/modules/m_spanningtree/ping.cpp @@ -23,12 +23,9 @@ #include "m_spanningtree/main.h" #include "m_spanningtree/utils.h" #include "m_spanningtree/treeserver.h" -#include "m_spanningtree/link.h" #include "m_spanningtree/treesocket.h" -#include "m_spanningtree/resolvers.h" -#include "m_spanningtree/handshaketimer.h" -/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h */ +/* $ModDep: m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h */ bool TreeSocket::LocalPing(const std::string &prefix, std::deque ¶ms) { diff --git a/src/modules/m_spanningtree/pong.cpp b/src/modules/m_spanningtree/pong.cpp index 13860f0e9..e9bed25b8 100644 --- a/src/modules/m_spanningtree/pong.cpp +++ b/src/modules/m_spanningtree/pong.cpp @@ -23,12 +23,9 @@ #include "m_spanningtree/main.h" #include "m_spanningtree/utils.h" #include "m_spanningtree/treeserver.h" -#include "m_spanningtree/link.h" #include "m_spanningtree/treesocket.h" -#include "m_spanningtree/resolvers.h" -#include "m_spanningtree/handshaketimer.h" -/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h */ +/* $ModDep: m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h */ bool TreeSocket::LocalPong(const std::string &prefix, std::deque ¶ms) { diff --git a/src/modules/m_spanningtree/postcommand.cpp b/src/modules/m_spanningtree/postcommand.cpp index d63fff686..dd2b936d4 100644 --- a/src/modules/m_spanningtree/postcommand.cpp +++ b/src/modules/m_spanningtree/postcommand.cpp @@ -21,17 +21,12 @@ #include "xline.h" #include "transport.h" -#include "m_spanningtree/timesynctimer.h" -#include "m_spanningtree/resolvers.h" #include "m_spanningtree/main.h" #include "m_spanningtree/utils.h" #include "m_spanningtree/treeserver.h" -#include "m_spanningtree/link.h" #include "m_spanningtree/treesocket.h" -#include "m_spanningtree/rconnect.h" -#include "m_spanningtree/rsquit.h" -/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_spanningtree/rconnect.h m_spanningtree/rsquit.h */ +/* $ModDep: m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h */ void ModuleSpanningTree::OnPostCommand(const std::string &command, const std::vector& parameters, User *user, CmdResult result, const std::string &original_line) { diff --git a/src/modules/m_spanningtree/precommand.cpp b/src/modules/m_spanningtree/precommand.cpp index 631a20557..beffba6e9 100644 --- a/src/modules/m_spanningtree/precommand.cpp +++ b/src/modules/m_spanningtree/precommand.cpp @@ -21,17 +21,12 @@ #include "xline.h" #include "transport.h" -#include "m_spanningtree/timesynctimer.h" -#include "m_spanningtree/resolvers.h" #include "m_spanningtree/main.h" #include "m_spanningtree/utils.h" #include "m_spanningtree/treeserver.h" -#include "m_spanningtree/link.h" #include "m_spanningtree/treesocket.h" -#include "m_spanningtree/rconnect.h" -#include "m_spanningtree/rsquit.h" -/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_spanningtree/rconnect.h m_spanningtree/rsquit.h */ +/* $ModDep: m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h */ int ModuleSpanningTree::OnPreCommand(std::string &command, std::vector& parameters, User *user, bool validated, const std::string &original_line) { diff --git a/src/modules/m_spanningtree/push.cpp b/src/modules/m_spanningtree/push.cpp index 631eef4f6..460cb71db 100644 --- a/src/modules/m_spanningtree/push.cpp +++ b/src/modules/m_spanningtree/push.cpp @@ -23,12 +23,9 @@ #include "m_spanningtree/main.h" #include "m_spanningtree/utils.h" #include "m_spanningtree/treeserver.h" -#include "m_spanningtree/link.h" #include "m_spanningtree/treesocket.h" -#include "m_spanningtree/resolvers.h" -#include "m_spanningtree/handshaketimer.h" -/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h */ +/* $ModDep: m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h */ bool TreeSocket::Push(const std::string &prefix, std::deque ¶ms) { diff --git a/src/modules/m_spanningtree/rconnect.cpp b/src/modules/m_spanningtree/rconnect.cpp index 462c1e03d..3e514563d 100644 --- a/src/modules/m_spanningtree/rconnect.cpp +++ b/src/modules/m_spanningtree/rconnect.cpp @@ -19,7 +19,6 @@ #include "xline.h" #include "transport.h" -#include "m_spanningtree/timesynctimer.h" #include "m_spanningtree/resolvers.h" #include "m_spanningtree/main.h" #include "m_spanningtree/utils.h" @@ -28,7 +27,7 @@ #include "m_spanningtree/treesocket.h" #include "m_spanningtree/rconnect.h" -/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_spanningtree/rconnect.h */ +/* $ModDep: m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_spanningtree/rconnect.h */ cmd_rconnect::cmd_rconnect (InspIRCd* Instance, Module* Callback, SpanningTreeUtilities* Util) : Command(Instance, "RCONNECT", "o", 2), Creator(Callback), Utils(Util) { diff --git a/src/modules/m_spanningtree/resolvers.cpp b/src/modules/m_spanningtree/resolvers.cpp index 1f0470ef3..1673a02de 100644 --- a/src/modules/m_spanningtree/resolvers.cpp +++ b/src/modules/m_spanningtree/resolvers.cpp @@ -26,7 +26,7 @@ #include "m_spanningtree/link.h" #include "m_spanningtree/treesocket.h" -/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h */ +/* $ModDep: m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h */ /** This class is used to resolve server hostnames during /connect and autoconnect. * As of 1.1, the resolver system is seperated out from BufferedSocket, so we must do this diff --git a/src/modules/m_spanningtree/rsquit.cpp b/src/modules/m_spanningtree/rsquit.cpp index e4c9519cc..1b798deb7 100644 --- a/src/modules/m_spanningtree/rsquit.cpp +++ b/src/modules/m_spanningtree/rsquit.cpp @@ -19,16 +19,13 @@ #include "xline.h" #include "transport.h" -#include "m_spanningtree/timesynctimer.h" -#include "m_spanningtree/resolvers.h" #include "m_spanningtree/main.h" #include "m_spanningtree/utils.h" #include "m_spanningtree/treeserver.h" -#include "m_spanningtree/link.h" #include "m_spanningtree/treesocket.h" #include "m_spanningtree/rsquit.h" -/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_spanningtree/rsquit.h */ +/* $ModDep: m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h m_spanningtree/rsquit.h */ cmd_rsquit::cmd_rsquit (InspIRCd* Instance, Module* Callback, SpanningTreeUtilities* Util) : Command(Instance, "RSQUIT", "o", 1), Creator(Callback), Utils(Util) { diff --git a/src/modules/m_spanningtree/server.cpp b/src/modules/m_spanningtree/server.cpp index 31c8b64ae..40e12b03a 100644 --- a/src/modules/m_spanningtree/server.cpp +++ b/src/modules/m_spanningtree/server.cpp @@ -22,13 +22,11 @@ #include "m_spanningtree/main.h" #include "m_spanningtree/utils.h" -#include "m_spanningtree/treeserver.h" #include "m_spanningtree/link.h" +#include "m_spanningtree/treeserver.h" #include "m_spanningtree/treesocket.h" -#include "m_spanningtree/resolvers.h" -#include "m_spanningtree/handshaketimer.h" -/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h */ +/* $ModDep: m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h m_spanningtree/link.h */ /* * Some server somewhere in the network introducing another server. diff --git a/src/modules/m_spanningtree/stats.cpp b/src/modules/m_spanningtree/stats.cpp index 8c862ebed..9ac255c37 100644 --- a/src/modules/m_spanningtree/stats.cpp +++ b/src/modules/m_spanningtree/stats.cpp @@ -25,10 +25,8 @@ #include "m_spanningtree/treeserver.h" #include "m_spanningtree/link.h" #include "m_spanningtree/treesocket.h" -#include "m_spanningtree/resolvers.h" -#include "m_spanningtree/handshaketimer.h" -/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h */ +/* $ModDep: m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h */ bool TreeSocket::Stats(const std::string &prefix, std::deque ¶ms) { diff --git a/src/modules/m_spanningtree/svsjoin.cpp b/src/modules/m_spanningtree/svsjoin.cpp index 5f9f94e95..276138200 100644 --- a/src/modules/m_spanningtree/svsjoin.cpp +++ b/src/modules/m_spanningtree/svsjoin.cpp @@ -23,12 +23,9 @@ #include "m_spanningtree/main.h" #include "m_spanningtree/utils.h" #include "m_spanningtree/treeserver.h" -#include "m_spanningtree/link.h" #include "m_spanningtree/treesocket.h" -#include "m_spanningtree/resolvers.h" -#include "m_spanningtree/handshaketimer.h" -/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h */ +/* $ModDep: m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h */ bool TreeSocket::ServiceJoin(const std::string &prefix, std::deque ¶ms) { diff --git a/src/modules/m_spanningtree/svsnick.cpp b/src/modules/m_spanningtree/svsnick.cpp index 9b0d3bed3..b2cd67128 100644 --- a/src/modules/m_spanningtree/svsnick.cpp +++ b/src/modules/m_spanningtree/svsnick.cpp @@ -23,12 +23,9 @@ #include "m_spanningtree/main.h" #include "m_spanningtree/utils.h" #include "m_spanningtree/treeserver.h" -#include "m_spanningtree/link.h" #include "m_spanningtree/treesocket.h" -#include "m_spanningtree/resolvers.h" -#include "m_spanningtree/handshaketimer.h" -/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h */ +/* $ModDep: m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h */ /** Because Andy insists that services-compatible servers must * implement SVSNICK and SVSJOIN, that's exactly what we do :p diff --git a/src/modules/m_spanningtree/svspart.cpp b/src/modules/m_spanningtree/svspart.cpp index bcb73741b..c3bc1b081 100644 --- a/src/modules/m_spanningtree/svspart.cpp +++ b/src/modules/m_spanningtree/svspart.cpp @@ -23,12 +23,9 @@ #include "m_spanningtree/main.h" #include "m_spanningtree/utils.h" #include "m_spanningtree/treeserver.h" -#include "m_spanningtree/link.h" #include "m_spanningtree/treesocket.h" -#include "m_spanningtree/resolvers.h" -#include "m_spanningtree/handshaketimer.h" -/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h */ +/* $ModDep: m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h */ bool TreeSocket::ServicePart(const std::string &prefix, std::deque ¶ms) { diff --git a/src/modules/m_spanningtree/time.cpp b/src/modules/m_spanningtree/time.cpp index fe3fd0461..85377a478 100644 --- a/src/modules/m_spanningtree/time.cpp +++ b/src/modules/m_spanningtree/time.cpp @@ -23,12 +23,9 @@ #include "m_spanningtree/main.h" #include "m_spanningtree/utils.h" #include "m_spanningtree/treeserver.h" -#include "m_spanningtree/link.h" #include "m_spanningtree/treesocket.h" -#include "m_spanningtree/resolvers.h" -#include "m_spanningtree/handshaketimer.h" -/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h */ +/* $ModDep: m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h */ bool TreeSocket::Time(const std::string &prefix, std::deque ¶ms) { diff --git a/src/modules/m_spanningtree/timesynctimer.cpp b/src/modules/m_spanningtree/timesynctimer.cpp deleted file mode 100644 index bea28f1e4..000000000 --- a/src/modules/m_spanningtree/timesynctimer.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/* +------------------------------------+ - * | Inspire Internet Relay Chat Daemon | - * +------------------------------------+ - * - * InspIRCd: (C) 2002-2008 InspIRCd Development Team - * See: http://www.inspircd.org/wiki/index.php/Credits - * - * This program is free but copyrighted software; see - * the file COPYING for details. - * - * --------------------------------------------------- - */ - -#include "inspircd.h" -#include "commands/cmd_whois.h" -#include "commands/cmd_stats.h" -#include "socket.h" -#include "wildcard.h" -#include "xline.h" -#include "transport.h" - -#include "m_spanningtree/timesynctimer.h" -#include "m_spanningtree/main.h" -#include "m_spanningtree/utils.h" -#include "m_spanningtree/treeserver.h" -#include "m_spanningtree/link.h" -#include "m_spanningtree/treesocket.h" - -/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h */ - -CacheRefreshTimer::CacheRefreshTimer(InspIRCd *Inst, SpanningTreeUtilities *Util) : Timer(3600, Inst->Time(), true), Instance(Inst), Utils(Util) -{ -} - -void CacheRefreshTimer::Tick(time_t TIME) -{ - Utils->RefreshIPCache(); -} - diff --git a/src/modules/m_spanningtree/timesynctimer.h b/src/modules/m_spanningtree/timesynctimer.h deleted file mode 100644 index 3f97255b3..000000000 --- a/src/modules/m_spanningtree/timesynctimer.h +++ /dev/null @@ -1,37 +0,0 @@ -/* +------------------------------------+ - * | Inspire Internet Relay Chat Daemon | - * +------------------------------------+ - * - * InspIRCd: (C) 2002-2008 InspIRCd Development Team - * See: http://www.inspircd.org/wiki/index.php/Credits - * - * This program is free but copyrighted software; see - * the file COPYING for details. - * - * --------------------------------------------------- - */ - -#ifndef __TIMESYNC_H__ -#define __TIMESYNC_H__ - -#include "timer.h" - -class ModuleSpanningTree; -class SpanningTreeUtilities; -class InspIRCd; - -/** Create a timer which recurs every second, we inherit from Timer. - * Timer is only one-shot however, so at the end of each Tick() we simply - * insert another of ourselves into the pending queue :) - */ -class CacheRefreshTimer : public Timer -{ - private: - InspIRCd *Instance; - SpanningTreeUtilities *Utils; - public: - CacheRefreshTimer(InspIRCd *Instance, SpanningTreeUtilities* Util); - virtual void Tick(time_t TIME); -}; - -#endif diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp index 669b06c8d..3e9558e83 100644 --- a/src/modules/m_spanningtree/treesocket1.cpp +++ b/src/modules/m_spanningtree/treesocket1.cpp @@ -29,7 +29,7 @@ #include "m_spanningtree/resolvers.h" #include "m_spanningtree/handshaketimer.h" -/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_hash.h */ +/* $ModDep: m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_hash.h m_spanningtree/handshaketimer.h */ /** Because most of the I/O gubbins are encapsulated within diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp index 806b8ab36..6f66598d9 100644 --- a/src/modules/m_spanningtree/treesocket2.cpp +++ b/src/modules/m_spanningtree/treesocket2.cpp @@ -28,7 +28,7 @@ #include "m_spanningtree/resolvers.h" #include "m_spanningtree/handshaketimer.h" -/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h */ +/* $ModDep: m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_spanningtree/handshaketimer.h */ void TreeSocket::WriteLine(std::string line) { diff --git a/src/modules/m_spanningtree/uid.cpp b/src/modules/m_spanningtree/uid.cpp index 32255b576..ce7718324 100644 --- a/src/modules/m_spanningtree/uid.cpp +++ b/src/modules/m_spanningtree/uid.cpp @@ -29,7 +29,7 @@ #include "m_spanningtree/resolvers.h" #include "m_spanningtree/handshaketimer.h" -/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_hash.h */ +/* $ModDep: m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_hash.h m_spanningtree/handshaketimer.h */ bool TreeSocket::ParseUID(const std::string &source, std::deque ¶ms) { diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp index 388725637..fd3a1545f 100644 --- a/src/modules/m_spanningtree/utils.cpp +++ b/src/modules/m_spanningtree/utils.cpp @@ -27,7 +27,7 @@ #include "m_spanningtree/treesocket.h" #include "m_spanningtree/resolvers.h" -/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h */ +/* $ModDep: m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h */ /** Yay for fast searches! * This is hundreds of times faster than recursion diff --git a/src/modules/m_spanningtree/version.cpp b/src/modules/m_spanningtree/version.cpp index 54141efee..5271be1d3 100644 --- a/src/modules/m_spanningtree/version.cpp +++ b/src/modules/m_spanningtree/version.cpp @@ -23,12 +23,9 @@ #include "m_spanningtree/main.h" #include "m_spanningtree/utils.h" #include "m_spanningtree/treeserver.h" -#include "m_spanningtree/link.h" #include "m_spanningtree/treesocket.h" -#include "m_spanningtree/resolvers.h" -#include "m_spanningtree/handshaketimer.h" -/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h */ +/* $ModDep: m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h */ bool TreeSocket::ServerVersion(const std::string &prefix, std::deque ¶ms) { diff --git a/src/modules/m_spanningtree/whois.cpp b/src/modules/m_spanningtree/whois.cpp index a67b57284..1763f427a 100644 --- a/src/modules/m_spanningtree/whois.cpp +++ b/src/modules/m_spanningtree/whois.cpp @@ -23,12 +23,9 @@ #include "m_spanningtree/main.h" #include "m_spanningtree/utils.h" #include "m_spanningtree/treeserver.h" -#include "m_spanningtree/link.h" #include "m_spanningtree/treesocket.h" -#include "m_spanningtree/resolvers.h" -#include "m_spanningtree/handshaketimer.h" -/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h */ +/* $ModDep: m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h */ bool TreeSocket::Whois(const std::string &prefix, std::deque ¶ms) { -- cgit v1.2.3