#include "intrusive_list.h"
#include "compat.h"
#include "typedefs.h"
+#include "stdalgo.h"
CoreExport extern InspIRCd* ServerInstance;
/** Timer manager class, triggers Timer timer events
*/
- TimerManager* Timers;
+ TimerManager Timers;
/** X-Line manager. Handles G/K/Q/E line setting, removal and matching
*/
/** 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
*/
*/
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
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
*/
return Version(cmd.name, VF_VENDOR|VF_CORE);
}
};
+
+inline void stdalgo::culldeleter::operator()(classbase* item)
+{
+ if (item)
+ ServerInstance->GlobalCulls.AddItem(item);
+}