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:
+8
-6
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user