summaryrefslogtreecommitdiff
path: root/src/nickcore.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-06-19 11:54:08 -0400
committerAdam <Adam@anope.org>2010-06-19 11:54:08 -0400
commit52058fe87b4b0475b1775198c725af14e540d355 (patch)
treec3597d6411a006ffbb670d2ce761101b9640e9b6 /src/nickcore.cpp
parent43e951aed54f838ba55a4c1552214773aee2fb2f (diff)
parentdf9d291bcba9788e51d11424ebaf6f05c26cc80f (diff)
Merge remote branch 'origin/1.9.3' into 1.9
Diffstat (limited to 'src/nickcore.cpp')
-rw-r--r--src/nickcore.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/nickcore.cpp b/src/nickcore.cpp
index 1b01c3d54..cf92b0b3d 100644
--- a/src/nickcore.cpp
+++ b/src/nickcore.cpp
@@ -1,7 +1,5 @@
#include "services.h"
-#include "pseudo.h"
-
-#define HASH(nick) ((tolower((nick)[0])&31)<<5 | (tolower((nick)[1])&31))
+#include "modules.h"
/** Default constructor
* @param display The display nick
@@ -11,7 +9,6 @@ NickCore::NickCore(const std::string &coredisplay)
if (coredisplay.empty())
throw CoreException("Empty display passed to NickCore constructor");
- next = prev = NULL;
display = email = greet = url = NULL;
ot = NULL;
icq = 0;
@@ -19,13 +16,13 @@ NickCore::NickCore(const std::string &coredisplay)
lastmail = 0;
this->display = sstrdup(coredisplay.c_str());
- slist_init(&this->aliases);
- insert_core(this); // till hashing is redone..
/* Set default nick core flags */
for (size_t t = NI_BEGIN + 1; t != NI_END; ++t)
if (Config.NSDefFlags.HasFlag(static_cast<NickCoreFlag>(t)))
SetFlag(static_cast<NickCoreFlag>(t));
+
+ NickCoreList[this->display] = this;
}
/** Default destructor
@@ -51,12 +48,7 @@ NickCore::~NickCore()
cs_remove_nick(this);
/* Remove the core from the list */
- if (this->next)
- this->next->prev = this->prev;
- if (this->prev)
- this->prev->next = this->next;
- else
- nclists[HASH(this->display)] = this->next;
+ NickCoreList.erase(this->display);
/* Log .. */
Alog() << Config.s_NickServ << ": deleting nickname group " << this->display;