diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/modules.cpp | 3 | ||||
-rw-r--r-- | src/modules/m_filter.cpp | 8 | ||||
-rw-r--r-- | src/modules/m_spanningtree/netburst.cpp | 9 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src/modules.cpp b/src/modules.cpp index 65e0a53ca..f204f3fc1 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -116,9 +116,6 @@ void Module::OnPostConnect(User*) { DetachEvent(I_OnPostConnect); } void Module::OnUserMessage(User*, void*, int, const std::string&, char, const CUList&, MessageType) { DetachEvent(I_OnUserMessage); } void Module::OnUserInvite(User*, User*, Channel*, time_t, unsigned int, CUList&) { DetachEvent(I_OnUserInvite); } void Module::OnPostTopicChange(User*, Channel*, const std::string&) { DetachEvent(I_OnPostTopicChange); } -void Module::OnSyncUser(User*, ProtocolInterface::Server&) { DetachEvent(I_OnSyncUser); } -void Module::OnSyncChannel(Channel*, ProtocolInterface::Server&) { DetachEvent(I_OnSyncChannel); } -void Module::OnSyncNetwork(ProtocolInterface::Server&) { DetachEvent(I_OnSyncNetwork); } void Module::OnDecodeMetaData(Extensible*, const std::string&, const std::string&) { DetachEvent(I_OnDecodeMetaData); } void Module::OnChangeHost(User*, const std::string&) { DetachEvent(I_OnChangeHost); } void Module::OnChangeName(User*, const std::string&) { DetachEvent(I_OnChangeName); } diff --git a/src/modules/m_filter.cpp b/src/modules/m_filter.cpp index 8e43d2767..27c511c16 100644 --- a/src/modules/m_filter.cpp +++ b/src/modules/m_filter.cpp @@ -23,6 +23,7 @@ #include "inspircd.h" #include "xline.h" #include "modules/regex.h" +#include "modules/server.h" enum FilterFlags { @@ -154,7 +155,7 @@ class CommandFilter : public Command } }; -class ModuleFilter : public Module +class ModuleFilter : public Module, public ServerEventListener { typedef insp::flat_set<std::string, irc::insensitive_swo> ExemptTargetSet; @@ -292,7 +293,10 @@ bool ModuleFilter::AppliesToMe(User* user, FilterResult* filter, int iflags) } ModuleFilter::ModuleFilter() - : initing(true), filtcommand(this), RegexEngine(this, "regex") + : ServerEventListener(this) + , initing(true) + , filtcommand(this) + , RegexEngine(this, "regex") { } diff --git a/src/modules/m_spanningtree/netburst.cpp b/src/modules/m_spanningtree/netburst.cpp index cdafa9ded..5115c7aa8 100644 --- a/src/modules/m_spanningtree/netburst.cpp +++ b/src/modules/m_spanningtree/netburst.cpp @@ -27,6 +27,7 @@ #include "treeserver.h" #include "main.h" #include "commands.h" +#include "modules/server.h" /** * Creates FMODE messages, used only when syncing channels @@ -122,7 +123,7 @@ void TreeSocket::DoBurst(TreeServer* s) // Send all xlines this->SendXLines(); - FOREACH_MOD(OnSyncNetwork, (bs.server)); + FOREACH_MOD_CUSTOM(Utils->Creator->GetEventProvider(), ServerEventListener, OnSyncNetwork, (bs.server)); this->WriteLine(CmdBuilder("ENDBURST")); ServerInstance->SNO->WriteToSnoMask('l',"Finished bursting to \2"+ s->GetName()+"\2."); @@ -261,7 +262,7 @@ void TreeSocket::SyncChannel(Channel* chan, BurstState& bs) this->WriteLine(CommandMetadata::Builder(chan, item->name, value)); } - FOREACH_MOD(OnSyncChannel, (chan, bs.server)); + FOREACH_MOD_CUSTOM(Utils->Creator->GetEventProvider(), ServerEventListener, OnSyncChannel, (chan, bs.server)); } void TreeSocket::SyncChannel(Channel* chan) @@ -273,8 +274,6 @@ void TreeSocket::SyncChannel(Channel* chan) /** Send all users and their state, including oper and away status and global metadata */ void TreeSocket::SendUsers(BurstState& bs) { - ProtocolInterface::Server& piserver = bs.server; - const user_hash& users = ServerInstance->Users->GetUsers(); for (user_hash::const_iterator u = users.begin(); u != users.end(); ++u) { @@ -299,6 +298,6 @@ void TreeSocket::SendUsers(BurstState& bs) this->WriteLine(CommandMetadata::Builder(user, item->name, value)); } - FOREACH_MOD(OnSyncUser, (user, piserver)); + FOREACH_MOD_CUSTOM(Utils->Creator->GetEventProvider(), ServerEventListener, OnSyncUser, (user, bs.server)); } } |