diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-09-13 20:30:25 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-09-13 20:30:25 +0000 |
commit | 6d57bbe05c31c79eaad02fe81cfb9c1ed6b79c58 (patch) | |
tree | e0c89ed36b00f4c2925d7f39c32a835657b0fa6e /src/users.cpp | |
parent | 7eea21b8d43b0d5993e88b62d9d4894c2af49303 (diff) |
Change Extensible to use strongly typed entries
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11696 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/users.cpp')
-rw-r--r-- | src/users.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/users.cpp b/src/users.cpp index 63de155b7..4940df24e 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -25,14 +25,18 @@ unsigned long uniq_id = 1; static unsigned long* already_sent = NULL; +LocalIntExt User::NICKForced("NICKForced", NULL); +LocalStringExt User::OperQuit("OperQuit", NULL); + +static bool dummy_init = Extensible::Register(&User::NICKForced) ^ Extensible::Register(&User::OperQuit); void InitializeAlreadySent(SocketEngine* SE) { + (void)dummy_init; already_sent = new unsigned long[SE->GetMaxFds()]; memset(already_sent, 0, SE->GetMaxFds() * sizeof(unsigned long)); } - std::string User::ProcessNoticeMasks(const char *sm) { bool adding = true, oldadding = false; @@ -1028,11 +1032,9 @@ bool User::ForceNickChange(const char* newnick) this->InvalidateCache(); - this->Extend("NICKForced"); - + NICKForced.set(this, 1); FIRST_MOD_RESULT(ServerInstance, OnUserPreNick, MOD_RESULT, (this, newnick)); - - this->Shrink("NICKForced"); + NICKForced.set(this, 0); if (MOD_RESULT == MOD_RES_DENY) { @@ -1046,9 +1048,9 @@ bool User::ForceNickChange(const char* newnick) { std::vector<std::string> parameters; parameters.push_back(newnick); - this->Extend("NICKForced"); + NICKForced.set(this, 1); bool result = (ServerInstance->Parser->CallHandler("NICK", parameters, this) == CMD_SUCCESS); - this->Shrink("NICKForced"); + NICKForced.set(this, 0); return result; } |