+/* +------------------------------------+
+ * | Inspire Internet Relay Chat Daemon |
+ * +------------------------------------+
+ *
+ * InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ * See: http://www.inspircd.org/wiki/index.php/Credits
+ *
+ * This program is free but copyrighted software; see
+ * the file COPYING for details.
+ *
+ * ---------------------------------------------------
+ */
+
#ifndef __TREESOCKET_H__
#define __TREESOCKET_H__
std::string ModuleList; /* Module list of other server from CAPAB */
std::map<std::string,std::string> CapKeys; /* CAPAB keys from other server */
Module* Hook; /* I/O hooking module that we're attached to for this socket */
+ std::string ourchallenge; /* Challenge sent for challenge/response */
+ std::string theirchallenge; /* Challenge recv for challenge/response */
public:
*/
ServerState GetLinkState();
+ /** Get challenge set in our CAPAB for challenge/response
+ */
+ const std::string& GetOurChallenge();
+
+ /** Get challenge set in our CAPAB for challenge/response
+ */
+ void SetOurChallenge(const std::string &c);
+
+ /** Get challenge set in their CAPAB for challenge/response
+ */
+ const std::string& GetTheirChallenge();
+
+ /** Get challenge set in their CAPAB for challenge/response
+ */
+ void SetTheirChallenge(const std::string &c);
+
/** Return the module which we are hooking to for I/O encapsulation
*/
Module* GetHook();
*/
~TreeSocket();
+ /** Generate random string used for challenge-response auth
+ */
+ std::string RandString(unsigned int length);
+
+ /** Construct a password, optionally hashed with the other side's
+ * challenge string
+ */
+ std::string MakePass(const std::string &password);
+
/** When an outbound connection finishes connecting, we receive
* this event, and must send our SERVER string to the other
* side. If the other side is happy, as outlined in the server
/** remote ADMIN. leet, huh? */
bool Admin(const std::string &prefix, std::deque<std::string> ¶ms);
+ /** Remote MODULES */
+ bool Modules(const std::string &prefix, std::deque<std::string> ¶ms);
+
bool Stats(const std::string &prefix, std::deque<std::string> ¶ms);
/** Because the core won't let users or even SERVERS set +o,
*/
bool ForceNick(const std::string &prefix, std::deque<std::string> ¶ms);
+ bool OperQuit(const std::string &prefix, std::deque<std::string> ¶ms);
+
/** 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