From 459658d0fc3772ea5d0c0d1a4df00dcf2e0f24af Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 11 Mar 2007 04:53:11 +0000 Subject: Just comments git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6655 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/main.h | 72 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 71 insertions(+), 1 deletion(-) diff --git a/src/modules/m_spanningtree/main.h b/src/modules/m_spanningtree/main.h index 71723a6a9..da0860eac 100644 --- a/src/modules/m_spanningtree/main.h +++ b/src/modules/m_spanningtree/main.h @@ -15,13 +15,16 @@ */ const long ProtocolVersion = 1104; - +/** Forward declarations + */ class cmd_rconnect; class SpanningTreeUtilities; class TimeSyncTimer; class TreeServer; class Link; +/** This is the main class for the spanningtree module + */ class ModuleSpanningTree : public Module { int line; @@ -32,27 +35,94 @@ class ModuleSpanningTree : public Module SpanningTreeUtilities* Utils; public: + /** Timer for clock syncs + */ TimeSyncTimer *SyncTimer; + + /** Constructor + */ ModuleSpanningTree(InspIRCd* Me); + + /** Shows /LINKS + */ void ShowLinks(TreeServer* Current, userrec* user, int hops); + + /** Counts local servers + */ int CountLocalServs(); + + /** Counts local and remote servers + */ int CountServs(); + + /** Handle LINKS command + */ void HandleLinks(const char** parameters, int pcnt, userrec* user); + + /** Handle LUSERS command + */ void HandleLusers(const char** parameters, int pcnt, userrec* user); + + /** Show MAP output to a user (recursive) + */ void ShowMap(TreeServer* Current, userrec* user, int depth, char matrix[128][80], float &totusers, float &totservers); + + /** Handle remote MOTD + */ int HandleMotd(const char** parameters, int pcnt, userrec* user); + + /** Handle remote ADMIN + */ int HandleAdmin(const char** parameters, int pcnt, userrec* user); + + /** Handle remote STATS + */ int HandleStats(const char** parameters, int pcnt, userrec* user); + + /** Handle MAP command + */ void HandleMap(const char** parameters, int pcnt, userrec* user); + + /** Handle SQUIT + */ int HandleSquit(const char** parameters, int pcnt, userrec* user); + + /** Handle TIME + */ int HandleTime(const char** parameters, int pcnt, userrec* user); + + /** Handle remote WHOIS + */ int HandleRemoteWhois(const char** parameters, int pcnt, userrec* user); + + /** Ping all local servers + */ void DoPingChecks(time_t curtime); + + /** Connect a server locally + */ void ConnectServer(Link* x); + + /** Check if any servers are due to be autoconnected + */ void AutoConnectServers(time_t curtime); + + /** Handle remote VERSON + */ int HandleVersion(const char** parameters, int pcnt, userrec* user); + + /** Handle CONNECT + */ int HandleConnect(const char** parameters, int pcnt, userrec* user); + + /** Send out time sync to all servers + */ void BroadcastTimeSync(); + + /** + ** *** MODULE EVENTS *** + **/ + virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, userrec *user, bool validated, const std::string &original_line); virtual void OnPostCommand(const std::string &command, const char** parameters, int pcnt, userrec *user, CmdResult result, const std::string &original_line); virtual void OnGetServerDescription(const std::string &servername,std::string &description); -- cgit v1.2.3