*/
typedef TR1NS::unordered_map<std::string, TreeServer*, irc::insensitive, irc::StrHashComp> server_hash;
-typedef std::set<TreeServer*> TreeServerList;
-
/** Contains helper functions and variables for this module,
* and keeps them out of the global namespace
*/
CacheRefreshTimer RefreshTimer;
public:
+ typedef std::set<TreeSocket*> TreeSocketSet;
+
/** Creator module
*/
ModuleSpanningTree* Creator;
/** 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
*/
/** 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
*/
/** 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);
+}