]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/treesocket.h
Route WALLOPS like a regular command, remove OnWallops hook
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / treesocket.h
index b6230a6a58741174bb7f29e6e1b494fcbd2fd394..0dcdc830e105a59df281e65efc82bbe440a7d1b3 100644 (file)
@@ -75,6 +75,12 @@ struct CapabData
        int capab_phase;                        /* Have sent CAPAB already */
        bool auth_fingerprint;                  /* Did we auth using SSL fingerprint */
        bool auth_challenge;                    /* Did we auth using challenge/response */
+
+       // Data saved from incoming SERVER command, for later use when our credentials have been accepted by the other party
+       std::string description;
+       std::string sid;
+       std::string name;
+       bool hidden;
 };
 
 /** Every SERVER connection inbound or outbound is represented by an object of
@@ -92,6 +98,11 @@ class TreeSocket : public BufferedSocket
        bool LastPingWasGood;                   /* Responded to last ping we sent? */
        int proto_version;                      /* Remote protocol version */
        bool ConnectionFailureShown; /* Set to true if a connection failure message was shown */
+
+       /** Checks if the given servername and sid are both free
+        */
+       bool CheckDuplicate(const std::string& servername, const std::string& sid);
+
  public:
        time_t age;
 
@@ -152,11 +163,11 @@ class TreeSocket : public BufferedSocket
         * to server docs on the inspircd.org site, the other side
         * will then send back its own server string.
         */
-       virtual void OnConnected();
+       void OnConnected();
 
        /** Handle socket error event
         */
-       virtual void OnError(BufferedSocketError e);
+       void OnError(BufferedSocketError e) CXX11_OVERRIDE;
 
        /** Sends an error to the remote server, and displays it locally to show
         * that it was sent.
@@ -301,10 +312,10 @@ class TreeSocket : public BufferedSocket
 
        /** Handle socket timeout from connect()
         */
-       virtual void OnTimeout();
+       void OnTimeout();
        /** Handle server quit on close
         */
-       virtual void Close();
+       void Close();
 
        /** Returns true if this server was introduced to the rest of the network
         */