diff options
author | Adam <Adam@anope.org> | 2013-05-05 01:55:04 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-05-05 01:55:04 -0400 |
commit | 1d0bb9b26b7ad58ab0bf979ac046f4511b3bf12b (patch) | |
tree | 4486f0784bdf050fd7eb225c0cb9df352ce1f45a /src/nickcore.cpp | |
parent | 781defb7076ddfddf723ca08cd0a518b6657b64f (diff) |
Rework the config file reader to be much more flexible and move many configuration directives to the actual modules they are used in.
Diffstat (limited to 'src/nickcore.cpp')
-rw-r--r-- | src/nickcore.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/nickcore.cpp b/src/nickcore.cpp index dcd324846..e2b47e953 100644 --- a/src/nickcore.cpp +++ b/src/nickcore.cpp @@ -25,19 +25,16 @@ NickCore::NickCore(const Anope::string &coredisplay) : Serializable("NickCore"), this->o = NULL; this->channelcount = 0; this->lastmail = 0; - this->memos.memomax = Config->MSMaxMemos; - this->language = Config->NSDefLanguage; + this->memos.memomax = 0; this->display = coredisplay; - /* Set default nick core flags */ - for (std::set<Anope::string>::const_iterator it = Config->NSDefFlags.begin(), it_end = Config->NSDefFlags.end(); it != it_end; ++it) - this->ExtendMetadata(*it); - size_t old = NickCoreList->size(); (*NickCoreList)[this->display] = this; if (old == NickCoreList->size()) Log(LOG_DEBUG) << "Duplicate account " << coredisplay << " in nickcore table?"; + + FOREACH_MOD(I_OnNickCoreCreate, OnNickCoreCreate(this)); } NickCore::~NickCore() @@ -174,6 +171,11 @@ Anope::string NickCore::GetAccess(unsigned entry) const return this->access[entry]; } +unsigned NickCore::GetAccessCount() const +{ + return this->access.size(); +} + bool NickCore::FindAccess(const Anope::string &entry) { for (unsigned i = 0, end = this->access.size(); i < end; ++i) |