]> 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 ded03d6ca906460999c86b85af55b59c4e642b91..097f60fbb95a0c9ca93fedfaa9280a834a52be24 100644 (file)
@@ -89,7 +89,8 @@ struct CapabData
  */
 class TreeSocket : public BufferedSocket
 {
-       SpanningTreeUtilities* Utils;           /* Utility class */
+       class BurstState;
+
        std::string linkID;                     /* Description for this link */
        ServerState LinkState;                  /* Link state */
        CapabData* capab;                       /* Link setup data (held until burst is sent) */
@@ -103,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;
 
@@ -111,13 +122,13 @@ class TreeSocket : public BufferedSocket
         * most of the action, and append a few of our own values
         * to it.
         */
-       TreeSocket(SpanningTreeUtilities* Util, Link* link, Autoconnect* myac, const std::string& ipaddr);
+       TreeSocket(Link* link, Autoconnect* myac, const std::string& ipaddr);
 
        /** When a listening socket gives us a new file descriptor,
         * we must associate it with a socket without creating a new
         * connection. This constructor is used for this purpose.
         */
-       TreeSocket(SpanningTreeUtilities* Util, int newfd, ListenSocket* via, irc::sockets::sockaddrs* client, irc::sockets::sockaddrs* server);
+       TreeSocket(int newfd, ListenSocket* via, irc::sockets::sockaddrs* client, irc::sockets::sockaddrs* server);
 
        /** Get link state
         */
@@ -209,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.
@@ -224,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
@@ -241,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);