From 37b3535543b81c3d75c8f62b83d422f0d2fbced0 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 27 May 2013 19:36:37 -0400 Subject: Initially attach all modules to all events, and detach them as the events are run if they are not implemented per module --- src/bots.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/bots.cpp') diff --git a/src/bots.cpp b/src/bots.cpp index 3ea2ef485..74cf0d9e4 100644 --- a/src/bots.cpp +++ b/src/bots.cpp @@ -31,7 +31,7 @@ BotInfo::BotInfo(const Anope::string &nnick, const Anope::string &nuser, const A if (!this->uid.empty()) (*BotListByUID)[this->uid] = this; - FOREACH_MOD(I_OnCreateBot, OnCreateBot(this)); + FOREACH_MOD(OnCreateBot, (this)); // If we're synchronised with the uplink already, send the bot. if (Me && Me->IsSynced()) @@ -49,7 +49,7 @@ BotInfo::BotInfo(const Anope::string &nnick, const Anope::string &nuser, const A BotInfo::~BotInfo() { - FOREACH_MOD(I_OnDelBot, OnDelBot(this)); + FOREACH_MOD(OnDelBot, (this)); // If we're synchronised with the uplink already, send the bot. if (Me && Me->IsSynced()) @@ -133,8 +133,8 @@ const std::set &BotInfo::GetChannels() const void BotInfo::Assign(User *u, ChannelInfo *ci) { - EventReturn MOD_RESULT = EVENT_CONTINUE; - FOREACH_RESULT(I_OnPreBotAssign, OnPreBotAssign(u, ci, this)); + EventReturn MOD_RESULT; + FOREACH_RESULT(OnPreBotAssign, MOD_RESULT, (u, ci, this)); if (MOD_RESULT == EVENT_STOP) return; @@ -144,13 +144,13 @@ void BotInfo::Assign(User *u, ChannelInfo *ci) ci->bi = this; this->channels->insert(ci); - FOREACH_MOD(I_OnBotAssign, OnBotAssign(u, ci, this)); + FOREACH_MOD(OnBotAssign, (u, ci, this)); } void BotInfo::UnAssign(User *u, ChannelInfo *ci) { - EventReturn MOD_RESULT = EVENT_CONTINUE; - FOREACH_RESULT(I_OnBotUnAssign, OnBotUnAssign(u, ci)); + EventReturn MOD_RESULT; + FOREACH_RESULT(OnBotUnAssign, MOD_RESULT, (u, ci)); if (MOD_RESULT == EVENT_STOP) return; -- cgit