summaryrefslogtreecommitdiff
path: root/include/users.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/users.h')
-rw-r--r--include/users.h89
1 files changed, 42 insertions, 47 deletions
diff --git a/include/users.h b/include/users.h
index b9b23eaef..1fca831ef 100644
--- a/include/users.h
+++ b/include/users.h
@@ -14,13 +14,8 @@
#ifndef __USERS_H__
#define __USERS_H__
-#include <string>
-#include "inspircd_config.h"
#include "socket.h"
-#include "channels.h"
-#include "inspstring.h"
#include "connection.h"
-#include "hashcomp.h"
#include "dns.h"
/** Channel status for a user
@@ -76,47 +71,8 @@ enum RegistrationState {
};
/* Required forward declaration */
-class InspIRCd;
-
-/** Derived from Resolver, and performs user forward/reverse lookups.
- */
-class CoreExport UserResolver : public Resolver
-{
- private:
- /** User this class is 'attached' to.
- */
- User* bound_user;
- /** File descriptor teh lookup is bound to
- */
- int bound_fd;
- /** True if the lookup is forward, false if is a reverse lookup
- */
- bool fwd;
- public:
- /** Create a resolver.
- * @param Instance The creating instance
- * @param user The user to begin lookup on
- * @param to_resolve The IP or host to resolve
- * @param qt The query type
- * @param cache Modified by the constructor if the result was cached
- */
- UserResolver(InspIRCd* Instance, User* user, std::string to_resolve, QueryType qt, bool &cache);
-
- /** Called on successful lookup
- * @param result Result string
- * @param ttl Time to live for result
- * @param cached True if the result was found in the cache
- * @param resultnum Result number, we are only interested in result 0
- */
- void OnLookupComplete(const std::string &result, unsigned int ttl, bool cached, int resultnum = 0);
-
- /** Called on failed lookup
- * @param e Error code
- * @param errormessage Error message string
- */
- void OnError(ResolverError e, const std::string &errormessage);
-};
-
+class Channel;
+class UserResolver;
/** Holds information relevent to &lt;connect allow&gt; and &lt;connect deny&gt; tags in the config file.
*/
@@ -1146,8 +1102,47 @@ class CoreExport User : public connection
virtual ~User();
};
+/** Derived from Resolver, and performs user forward/reverse lookups.
+ */
+class CoreExport UserResolver : public Resolver
+{
+ private:
+ /** User this class is 'attached' to.
+ */
+ User* bound_user;
+ /** File descriptor teh lookup is bound to
+ */
+ int bound_fd;
+ /** True if the lookup is forward, false if is a reverse lookup
+ */
+ bool fwd;
+ public:
+ /** Create a resolver.
+ * @param Instance The creating instance
+ * @param user The user to begin lookup on
+ * @param to_resolve The IP or host to resolve
+ * @param qt The query type
+ * @param cache Modified by the constructor if the result was cached
+ */
+ UserResolver(InspIRCd* Instance, User* user, std::string to_resolve, QueryType qt, bool &cache);
+
+ /** Called on successful lookup
+ * @param result Result string
+ * @param ttl Time to live for result
+ * @param cached True if the result was found in the cache
+ * @param resultnum Result number, we are only interested in result 0
+ */
+ void OnLookupComplete(const std::string &result, unsigned int ttl, bool cached, int resultnum = 0);
+
+ /** Called on failed lookup
+ * @param e Error code
+ * @param errormessage Error message string
+ */
+ void OnError(ResolverError e, const std::string &errormessage);
+};
+
/* Configuration callbacks */
-class ServerConfig;
+//class ServerConfig;
#endif