1
0
mirror of https://github.com/anope/anope.git synced 2026-07-06 14:33:13 +02:00

Rework the config file reader to be much more flexible and move many configuration directives to the actual modules they are used in.

This commit is contained in:
Adam
2013-05-05 01:55:04 -04:00
parent 781defb707
commit 1d0bb9b26b
165 changed files with 3093 additions and 4861 deletions
+8 -6
View File
@@ -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)