]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/treesocket.h
Pass an interface to the OnSync hooks
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / treesocket.h
index ba22e28411a1adb61e5ef9fcc2404dca92c5ea50..097f60fbb95a0c9ca93fedfaa9280a834a52be24 100644 (file)
@@ -89,6 +89,8 @@ struct CapabData
  */
 class TreeSocket : public BufferedSocket
 {
+       class BurstState;
+
        std::string linkID;                     /* Description for this link */
        ServerState LinkState;                  /* Link state */
        CapabData* capab;                       /* Link setup data (held until burst is sent) */
@@ -102,6 +104,16 @@ class TreeSocket : public BufferedSocket
         */
        bool CheckDuplicate(const std::string& servername, const std::string& sid);
 
+       /** Send all ListModeBase modes set on the channel
+        */
+       void SendListModes(Channel* chan);
+
+       /** Send all known information about a channel */
+       void SyncChannel(Channel* chan, BurstState& bs);
+
+       /** Send all users and their oper state, away state and metadata */
+       void SendUsers(BurstState& bs);
+
  public:
        const time_t age;
 
@@ -208,9 +220,6 @@ class TreeSocket : public BufferedSocket
         */
        void Squit(TreeServer* Current, const std::string &reason);
 
-       /* Used on nick collision ... XXX ugly function HACK */
-       int DoCollision(User *u, time_t remotets, const std::string &remoteident, const std::string &remoteip, const std::string &remoteuid);
-
        /** Send one or more FJOINs for a channel of users.
         * If the length of a single line is more than 480-NICKMAX
         * in length, it is split over multiple lines.
@@ -223,9 +232,6 @@ class TreeSocket : public BufferedSocket
        /** Send all known information about a channel */
        void SyncChannel(Channel* chan);
 
-       /** send all users and their oper state/modes */
-       void SendUsers();
-
        /** This function is called when we want to send a netburst to a local
         * server. There is a set order we must do this, because for example
         * users require their servers to exist, and channels require their
@@ -240,57 +246,11 @@ class TreeSocket : public BufferedSocket
 
        /** Send one or more complete lines down the socket
         */
-       void WriteLine(std::string line);
+       void WriteLine(const std::string& line);
 
        /** Handle ERROR command */
        void Error(parameterlist &params);
 
-       /** Remote AWAY */
-       bool Away(const std::string &prefix, parameterlist &params);
-
-       /** SAVE to resolve nick collisions without killing */
-       bool ForceNick(const std::string &prefix, parameterlist &params);
-
-       /** ENCAP command
-        */
-       void Encap(User* who, parameterlist &params);
-
-       /** OPERQUIT command
-        */
-       bool OperQuit(const std::string &prefix, parameterlist &params);
-
-       /** PONG
-        */
-       bool LocalPong(const std::string &prefix, parameterlist &params);
-
-       /** VERSION
-        */
-       bool ServerVersion(const std::string &prefix, parameterlist &params);
-
-       /** ADDLINE
-        */
-       bool AddLine(const std::string &prefix, parameterlist &params);
-
-       /** DELLINE
-        */
-       bool DelLine(const std::string &prefix, parameterlist &params);
-
-       /** WHOIS
-        */
-       bool Whois(const std::string &prefix, parameterlist &params);
-
-       /** PUSH
-        */
-       bool Push(const std::string &prefix, parameterlist &params);
-
-       /** PING
-        */
-       bool LocalPing(const std::string &prefix, parameterlist &params);
-
-       /** <- (remote) <- SERVER
-        */
-       bool RemoteServer(const std::string &prefix, parameterlist &params);
-
        /** (local) -> SERVER
         */
        bool Outbound_Reply_Server(parameterlist &params);