X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Futils.h;h=345b62b099b3c9edb8872eff781d516ed95814cb;hb=67de413cad88194972d55a8ff88464370890c5a9;hp=58821bd2b7a65df26cff550608176880efc367a5;hpb=5dcd385b772f2ce822cf0700912ced93bd06c914;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/utils.h b/src/modules/m_spanningtree/utils.h index 58821bd2b..345b62b09 100644 --- a/src/modules/m_spanningtree/utils.h +++ b/src/modules/m_spanningtree/utils.h @@ -40,8 +40,6 @@ extern SpanningTreeUtilities* Utils; */ typedef TR1NS::unordered_map server_hash; -typedef std::set TreeServerList; - /** Contains helper functions and variables for this module, * and keeps them out of the global namespace */ @@ -54,6 +52,8 @@ class SpanningTreeUtilities : public classbase CacheRefreshTimer RefreshTimer; public: + typedef std::set TreeSocketSet; + /** Creator module */ ModuleSpanningTree* Creator; @@ -134,7 +134,7 @@ class SpanningTreeUtilities : public classbase /** Send a message from this server to all but one other, local or remote */ - void DoOneToAllButSender(const std::string &prefix, const std::string &command, const parameterlist& params, const std::string& omit); + void DoOneToAllButSender(const std::string& prefix, const std::string& command, const parameterlist& params, TreeServer* omit); /** Send a message from this server to all others */ @@ -150,7 +150,7 @@ class SpanningTreeUtilities : public classbase /** Compile a list of servers which contain members of channel c */ - void GetListOfServersForChannel(Channel* c, TreeServerList &list, char status, const CUList &exempt_list); + void GetListOfServersForChannel(Channel* c, TreeSocketSet& list, char status, const CUList& exempt_list); /** Find a server by name */ @@ -178,5 +178,10 @@ class SpanningTreeUtilities : public classbase /** Sends a PRIVMSG or a NOTICE to a channel obeying an exempt list and an optional prefix */ - void SendChannelMessage(const std::string& prefix, Channel* target, const std::string &text, char status, const CUList& exempt_list, const char* message_type); + void SendChannelMessage(const std::string& prefix, Channel* target, const std::string& text, char status, const CUList& exempt_list, const char* message_type, TreeSocket* omit = NULL); }; + +inline void SpanningTreeUtilities::DoOneToMany(const std::string& prefix, const std::string& command, const parameterlist& params) +{ + DoOneToAllButSender(prefix, command, params, NULL); +}