X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Finspircd.h;h=db13b2ab34414c493f0edda12819427d0b9c5538;hb=a6e68c0d346395630dee9dc69211a284360b6c62;hp=897ae9e1809e4aa62e4405632b0777b4bb940c50;hpb=932e8d13f81c7c94a89dc3702f6d45bc185f5dcf;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/inspircd.h b/include/inspircd.h index 897ae9e18..db13b2ab3 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -46,6 +46,7 @@ #include "intrusive_list.h" #include "compat.h" #include "typedefs.h" +#include "stdalgo.h" CoreExport extern InspIRCd* ServerInstance; @@ -334,10 +335,6 @@ class CoreExport InspIRCd */ CommandParser* Parser; - /** Socket engine, handles socket activity events - */ - SocketEngine* SE; - /** Thread engine, Handles threading where required */ ThreadEngine* Threads; @@ -375,7 +372,7 @@ class CoreExport InspIRCd /** Timer manager class, triggers Timer timer events */ - TimerManager* Timers; + TimerManager Timers; /** X-Line manager. Handles G/K/Q/E line setting, removal and matching */ @@ -387,7 +384,7 @@ class CoreExport InspIRCd /** Channel list, a hash_map containing all channels XXX move to channel manager class */ - chan_hash* chanlist; + chan_hash chanlist; /** List of the open ports */ @@ -464,6 +461,11 @@ class CoreExport InspIRCd */ Channel* FindChan(const std::string &chan); + /** Get a hash map containing all channels, keyed by their name + * @return A hash map mapping channel names to Channel pointers + */ + chan_hash& GetChans() { return chanlist; } + /** Return true if a channel name is valid * @param chname A channel name to verify * @return True if the name is valid @@ -506,11 +508,6 @@ class CoreExport InspIRCd static const char* Format(const char* formatString, ...) CUSTOM_PRINTF(1, 2); static const char* Format(va_list &vaList, const char* formatString) CUSTOM_PRINTF(2, 0); - /** Return a count of channels on the network - * @return The number of channels - */ - long ChannelCount() const { return chanlist->size(); } - /** Send an error notice to all local users, opered and unopered * @param s The error string to send */ @@ -575,27 +572,6 @@ class CoreExport InspIRCd */ void Rehash(const std::string& uuid = ""); - /** Check if the given nickmask matches too many users, send errors to the given user - * @param nick A nickmask to match against - * @param user A user to send error text to - * @return True if the nick matches too many users - */ - bool NickMatchesEveryone(const std::string &nick, User* user); - - /** Check if the given IP mask matches too many users, send errors to the given user - * @param ip An ipmask to match against - * @param user A user to send error text to - * @return True if the ip matches too many users - */ - bool IPMatchesEveryone(const std::string &ip, User* user); - - /** Check if the given hostmask matches too many users, send errors to the given user - * @param mask A hostmask to match against - * @param user A user to send error text to - * @return True if the host matches too many users - */ - bool HostMatchesEveryone(const std::string &mask, User* user); - /** Calculate a duration in seconds from a string in the form 1y2w3d4h6m5s * @param str A string containing a time in the form 1y2w3d4h6m5s * (one year, two weeks, three days, four hours, six minutes and five seconds) @@ -610,9 +586,9 @@ class CoreExport InspIRCd * @param data The data from the config file * @param input The data input by the oper * @param hashtype The hash from the config file - * @return 0 if the strings match, 1 or -1 if they do not + * @return True if the strings match, false if they do not */ - int PassCompare(Extensible* ex, const std::string &data, const std::string &input, const std::string &hashtype); + bool PassCompare(Extensible* ex, const std::string& data, const std::string& input, const std::string& hashtype); /** Returns the full version string of this ircd * @return The version string @@ -696,3 +672,9 @@ class CommandModule : public Module return Version(cmd.name, VF_VENDOR|VF_CORE); } }; + +inline void stdalgo::culldeleter::operator()(classbase* item) +{ + if (item) + ServerInstance->GlobalCulls.AddItem(item); +}