]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/treesocket.h
Update m_cloaking to use free-form keys instead of weakening the hash IV
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / treesocket.h
index 3c94849818f1f177327e7b08b8de3b362d0acc8a..a0f0e5d88e05622c921fb8ae901869f972f82544 100644 (file)
 #include "socket.h"
 #include "inspircd.h"
 #include "xline.h"
-#include "../transport.h"
 
 #include "utils.h"
-#include "handshaketimer.h"
 
 /*
  * The server list in InspIRCd is maintained as two structures
@@ -91,8 +89,7 @@ class TreeSocket : public BufferedSocket
        bool auth_challenge;                    /* Did we auth using challenge/response */
        int proto_version;                      /* Remote protocol version */
  public:
-       HandshakeTimer* hstimer;                /* Handshake timer, needed to work around I/O hook buffering */
-       Autoconnect* myautoconnect;             /* Autoconnect used to cause this connection, if any */
+       reference<Autoconnect> myautoconnect;           /* Autoconnect used to cause this connection, if any */
        time_t age;
 
        /** Because most of the I/O gubbins are encapsulated within
@@ -100,13 +97,13 @@ class TreeSocket : public BufferedSocket
         * most of the action, and append a few of our own values
         * to it.
         */
-       TreeSocket(SpanningTreeUtilities* Util, std::string host, int port, unsigned long maxtime, const std::string &ServerName, const std::string &bindto, Autoconnect* myac, Module* HookMod = NULL);
+       TreeSocket(SpanningTreeUtilities* Util, const std::string& host, int port, unsigned long maxtime, const std::string &ServerName, const std::string &bindto, Autoconnect* myac, const std::string& Hook);
 
        /** 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, char* ip, Autoconnect* myac, Module* HookMod = NULL);
+       TreeSocket(SpanningTreeUtilities* Util, int newfd, ListenSocketBase* via, irc::sockets::sockaddrs* client, irc::sockets::sockaddrs* server);
 
        /** Get link state
         */
@@ -136,6 +133,7 @@ class TreeSocket : public BufferedSocket
         */
        void CleanNegotiationInfo();
 
+       bool cull();
        /** Destructor
         */
        ~TreeSocket();
@@ -260,15 +258,12 @@ class TreeSocket : public BufferedSocket
        /** Handle ERROR command */
        bool Error(parameterlist &params);
 
-       /** remote MOTD. leet, huh? */
+       /** remote MOTD. */
        bool Motd(const std::string &prefix, parameterlist &params);
 
-       /** remote ADMIN. leet, huh? */
+       /** remote ADMIN. */
        bool Admin(const std::string &prefix, parameterlist &params);
 
-       /** Remote MODULES */
-       bool Modules(const std::string &prefix, parameterlist &params);
-
        bool Stats(const std::string &prefix, parameterlist &params);
 
        /** Because the core won't let users or even SERVERS set +o,
@@ -287,10 +282,6 @@ class TreeSocket : public BufferedSocket
        /** SAVE to resolve nick collisions without killing */
        bool ForceNick(const std::string &prefix, parameterlist &params);
 
-       /** PRIVMSG or NOTICE with server origin ONLY
-        */
-       bool ServerMessage(const std::string &messagetype, const std::string &prefix, parameterlist &params, const std::string &sourceserv);
-
        /** ENCAP command
         */
        bool Encap(const std::string &prefix, parameterlist &params);
@@ -375,13 +366,15 @@ class TreeSocket : public BufferedSocket
         */
        bool Inbound_Server(parameterlist &params);
 
-       /** Handle netsplit
+       /** Handle IRC line split
         */
-       void Split(const std::string &line, parameterlist &n);
+       void Split(const std::string &line, std::string& prefix, std::string& command, parameterlist &params);
 
        /** Process complete line from buffer
         */
-       bool ProcessLine(std::string &line);
+       void ProcessLine(std::string &line);
+
+       void ProcessConnectedLine(std::string& prefix, std::string& command, parameterlist& params);
 
        /** Get this server's name
         */