int bound_fd;
bool fwd;
public:
- UserResolver(InspIRCd* Instance, userrec* user, std::string to_resolve, bool forward);
+ UserResolver(InspIRCd* Instance, userrec* user, std::string to_resolve, QueryType qt);
void OnLookupComplete(const std::string &result);
void OnError(ResolverError e, const std::string &errormessage);
/** Typedef for the list of user-channel records for a user
*/
-typedef std::vector<ucrec*> UserChanList;
+typedef std::map<chanrec*, char> UserChanList;
+typedef UserChanList::iterator UCListIter;
/** Holds all information about a user
* This class stores all information about a user connected to the irc server. Everything about a
*/
long recvqmax;
+ /** This is true if the user matched an exception when they connected to the ircd.
+ * It isnt valid after this point, and you should not attempt to do anything with it
+ * after this point, because the eline might be removed at a later time, and/or no
+ * longer be applicable to this user. It is only used to save doing the eline lookup
+ * twice (instead we do it once and set this value).
+ */
+ bool exempt;
+
/** Default constructor
* @throw Nothing at present
*/
*/
char* MakeWildHost();
- /** Creates a host.
- * Takes a buffer to use and fills the given buffer with the host in the format nick!user@host
- * @param Buffer to fill with host information
+ /** Creates a usermask with real host.
+ * Takes a buffer to use and fills the given buffer with the hostmask in the format user@host
+ * @return the usermask in the format user@host
+ */
+ char* MakeHost();
+
+ /** Creates a usermask with real ip.
+ * Takes a buffer to use and fills the given buffer with the ipmask in the format user@ip
+ * @return the usermask in the format user@ip
*/
- void MakeHost(char* nhost);
+ char* MakeHostIP();
/** Shuts down and closes the user's socket
* This will not cause the user to be deleted. Use InspIRCd::QuitUser for this,
*/
typedef std::map<irc::string,whowas_set*> whowas_users;
+ /** Sets of time and users in whowas list
+ */
+ typedef std::map<time_t,irc::string> whowas_users_fifo;
+
/** Called every hour by the core to remove expired entries
*/
void MaintainWhoWas(InspIRCd* ServerInstance, time_t TIME);
+
+ /** Prune for WhoWasGroupSize, WhoWasMaxGroups and
+ * WhoWasMaxKeep on rehash
+ */
+ void PruneWhoWas(InspIRCd* ServerInstance, time_t TIME);
};
};
/* Configuration callbacks */
class ServerConfig;
-bool InitTypes(ServerConfig* conf, const char* tag);
-bool InitClasses(ServerConfig* conf, const char* tag);
-bool DoType(ServerConfig* conf, const char* tag, char** entries, void** values, int* types);
-bool DoClass(ServerConfig* conf, const char* tag, char** entries, void** values, int* types);
-bool DoneClassesAndTypes(ServerConfig* conf, const char* tag);
#endif