diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/inspircd.h | 1 | ||||
-rw-r--r-- | include/membership.h | 3 | ||||
-rw-r--r-- | include/modules.h | 2 | ||||
-rw-r--r-- | include/typedefs.h | 6 |
4 files changed, 9 insertions, 3 deletions
diff --git a/include/inspircd.h b/include/inspircd.h index 7a8c1fb74..897ae9e18 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -43,6 +43,7 @@ #include <string> #include <vector> +#include "intrusive_list.h" #include "compat.h" #include "typedefs.h" diff --git a/include/membership.h b/include/membership.h index 78af85fde..b0924bef7 100644 --- a/include/membership.h +++ b/include/membership.h @@ -1,6 +1,7 @@ /* * InspIRCd -- Internet Relay Chat Daemon * + * Copyright (C) 2012-2014 Attila Molnar <attilamolnar@hush.com> * Copyright (C) 2009 Daniel De Graaf <danieldg@inspircd.org> * * This file is part of InspIRCd. InspIRCd is free software: you can @@ -19,7 +20,7 @@ #pragma once -class CoreExport Membership : public Extensible +class CoreExport Membership : public Extensible, public intrusive_list_node<Membership> { public: User* const user; diff --git a/include/modules.h b/include/modules.h index 7223f6b9d..d221803ab 100644 --- a/include/modules.h +++ b/include/modules.h @@ -556,7 +556,7 @@ class CoreExport Module : public classbase, public usecountbase * * Set exceptions[user] = true to include, exceptions[user] = false to exclude */ - virtual void OnBuildNeighborList(User* source, UserChanList &include_c, std::map<User*,bool> &exceptions); + virtual void OnBuildNeighborList(User* source, IncludeChanList& include_c, std::map<User*, bool>& exceptions); /** Called before any nickchange, local or remote. This can be used to implement Q-lines etc. * Please note that although you can see remote nickchanges through this function, you should diff --git a/include/typedefs.h b/include/typedefs.h index 3801a48c0..050707e73 100644 --- a/include/typedefs.h +++ b/include/typedefs.h @@ -72,12 +72,16 @@ typedef std::vector<reference<ConnectClass> > ClassVector; /** Typedef for the list of user-channel records for a user */ -typedef std::set<Channel*> UserChanList; +typedef intrusive_list<Membership> UserChanList; /** Shorthand for an iterator into a UserChanList */ typedef UserChanList::iterator UCListIter; +/** List of channels to consider when building the neighbor list of a user + */ +typedef std::vector<Membership*> IncludeChanList; + /** A list of custom modes parameters on a channel */ typedef std::map<char,std::string> CustomModeList; |