]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/treesocket.h
Allow support for multiple dns results per request. This is a significant change...
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / treesocket.h
index ff06f0926691a92e1f539ecb79128565d24a2885..fae22638d6c8d4c030184e74f93fda7c0eebcd04 100644 (file)
@@ -95,7 +95,7 @@ class TreeSocket : public InspSocket
        std::string ourchallenge;               /* Challenge sent for challenge/response */
        std::string theirchallenge;             /* Challenge recv for challenge/response */
        std::string OutboundPass;               /* Outbound password */
-
+       bool sentcapab;                         /* Have sent CAPAB already */
  public:
 
        /** Because most of the I/O gubbins are encapsulated within
@@ -171,6 +171,11 @@ class TreeSocket : public InspSocket
         */
        virtual void OnError(InspSocketError e);
 
+       /** Sends an error to the remote server, and displays it locally to show
+        * that it was sent.
+        */
+       void SendError(const std::string &errormessage);
+
        /** Handle socket disconnect event
         */
        virtual int OnDisconnect();
@@ -290,12 +295,6 @@ class TreeSocket : public InspSocket
 
        bool OperQuit(const std::string &prefix, std::deque<std::string> &params);
 
-       /** Remote SQUIT (RSQUIT). Routing works similar to SVSNICK: Route it to the server that the target is connected to locally,
-        * then let that server do the dirty work (squit it!). Example:
-        * A -> B -> C -> D: oper on A squits D, A routes to B, B routes to C, C notices D connected locally, kills it. -- w00t
-        */
-       bool RemoteSquit(const std::string &prefix, std::deque<std::string> &params);
-
        /** SVSJOIN
         */
        bool ServiceJoin(const std::string &prefix, std::deque<std::string> &params);
@@ -394,5 +393,21 @@ class TreeSocket : public InspSocket
        virtual int OnIncomingConnection(int newsock, char* ip);
 };
 
+/* Used to validate the value lengths of multiple parameters for a command */
+struct cmd_validation
+{
+       const char* item;
+       size_t param;
+       size_t length;
+};
+
+/* Used to validate the length values in CAPAB CAPABILITIES */
+struct cap_validation
+{
+       const char* reason;
+       const char* key;
+       size_t size;
+};
+
 #endif