1
0
mirror of https://github.com/anope/anope.git synced 2026-06-25 20:26:39 +02:00

Burned slist, rewrote operservs XLine code

This commit is contained in:
Adam
2010-05-24 23:36:40 -05:00
committed by Adam
parent 3a2c2a916a
commit 2fba686904
72 changed files with 3346 additions and 3809 deletions
+7 -3
View File
@@ -42,7 +42,7 @@ NickAlias::NickAlias(const std::string &nickname, NickCore *nickcore)
this->nick = sstrdup(nickname.c_str());
this->nc = nickcore;
slist_add(&nc->aliases, this);
nc->aliases.push_back(this);
NickAliasList[this->nick] = this;
@@ -88,8 +88,12 @@ NickAlias::~NickAlias()
if (this->nc)
{
/* Next: see if our core is still useful. */
slist_remove(&this->nc->aliases, this);
if (this->nc->aliases.count == 0)
std::list<NickAlias *>::iterator it = std::find(this->nc->aliases.begin(), this->nc->aliases.end(), this);
if (it != this->nc->aliases.end())
{
nc->aliases.erase(it);
}
if (this->nc->aliases.empty())
{
delete this->nc;
this->nc = NULL;