summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2017-10-12 19:28:34 -0400
committerAdam <Adam@anope.org>2017-10-12 19:28:34 -0400
commitf13c450b938633a27014cabad377821f87ce16b0 (patch)
tree56dfaea42fde1c29f7a36a58a0a8b8edf38a7a8b
parente95c07291a824abbe7717f943e6f95eb6c638a4b (diff)
Add post init event
-rw-r--r--include/modules.h6
-rw-r--r--src/init.cpp2
2 files changed, 8 insertions, 0 deletions
diff --git a/include/modules.h b/include/modules.h
index 95b02f29a..c3dae33a5 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -301,6 +301,11 @@ class CoreExport Module : public Extensible
* before they will be called.
*/
+ /** Called on startup after database load, but before
+ * connecting to the uplink.
+ */
+ virtual void OnPostInit() { throw NotImplementedException(); }
+
/** Called before a user has been kicked from a channel.
* @param source The kicker
* @param cu The user, channel, and status of the user being kicked
@@ -1099,6 +1104,7 @@ class CoreExport Module : public Extensible
enum Implementation
{
+ I_OnPostInit,
I_OnPreUserKicked, I_OnUserKicked, I_OnReload, I_OnPreBotAssign, I_OnBotAssign, I_OnBotUnAssign, I_OnUserConnect,
I_OnNewServer, I_OnUserNickChange, I_OnPreHelp, I_OnPostHelp, I_OnPreCommand, I_OnPostCommand, I_OnSaveDatabase,
I_OnLoadDatabase, I_OnEncrypt, I_OnDecrypt, I_OnBotFantasy, I_OnBotNoFantasyAccess, I_OnBotBan, I_OnBadWordAdd,
diff --git a/src/init.cpp b/src/init.cpp
index 515f610f2..57c207eae 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -553,6 +553,8 @@ void Anope::Init(int ac, char **av)
static_cast<void>(MOD_RESULT);
Log() << "Databases loaded";
+ FOREACH_MOD(OnPostInit, ());
+
for (channel_map::const_iterator it = ChannelList.begin(), it_end = ChannelList.end(); it != it_end; ++it)
it->second->Sync();