summaryrefslogtreecommitdiff
path: root/src/servers.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2014-04-20 14:35:14 -0400
committerAdam <Adam@anope.org>2014-04-20 14:35:14 -0400
commit26ac315192e0d8a04d50e910697ab794eedf0cc1 (patch)
treeb9916f14fe35ce5c4de95c4194ca4ea0cb30812f /src/servers.cpp
parent0b6476f06ff9ce06545c421143c7d7163c750aa5 (diff)
New event system
Diffstat (limited to 'src/servers.cpp')
-rw-r--r--src/servers.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/servers.cpp b/src/servers.cpp
index 3f698815c..5e55d4c28 100644
--- a/src/servers.cpp
+++ b/src/servers.cpp
@@ -19,6 +19,7 @@
#include "protocol.h"
#include "config.h"
#include "channels.h"
+#include "event.h"
/* Anope */
Server *Me = NULL;
@@ -133,7 +134,7 @@ Server::Server(Server *up, const Anope::string &sname, unsigned shops, const Ano
}
}
- FOREACH_MOD(OnNewServer, (this));
+ Event::OnNewServer(&Event::NewServer::OnNewServer, this);
}
Server::~Server()
@@ -168,7 +169,7 @@ void Server::Delete(const Anope::string &reason)
{
this->quit_reason = reason;
this->quitting = true;
- FOREACH_MOD(OnServerQuit, (this));
+ Event::OnServerQuit(&Event::ServerQuit::OnServerQuit, this);
delete this;
}
@@ -256,7 +257,7 @@ void Server::Sync(bool sync_links)
Log(this, "sync") << "is done syncing";
- FOREACH_MOD(OnServerSync, (this));
+ Event::OnServerSync(&Event::ServerSync::OnServerSync, this);
if (sync_links && !this->links.empty())
{
@@ -268,7 +269,7 @@ void Server::Sync(bool sync_links)
if (me)
{
- FOREACH_MOD(OnPreUplinkSync, (this));
+ Event::OnPreUplinkSync(&Event::PreUplinkSync::OnPreUplinkSync, this);
}
for (channel_map::const_iterator it = ChannelList.begin(), it_end = ChannelList.end(); it != it_end;)
@@ -285,7 +286,7 @@ void Server::Sync(bool sync_links)
IRCD->SendEOB();
Me->Sync(false);
- FOREACH_MOD(OnUplinkSync, (this));
+ Event::OnUplinkSync(&Event::UplinkSync::OnUplinkSync, this);
if (!Anope::NoFork && Anope::AtTerm())
{