diff options
| author | Adam <Adam@anope.org> | 2012-04-23 05:08:26 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2012-04-23 05:08:26 -0400 |
| commit | 573e49a7ead331219eb6f0d3ca9cf83e793a5c9c (patch) | |
| tree | e145e04fa3d041cf92ce46da4ac790b63231059c /modules/commands/os_forbid.cpp | |
| parent | 63c639e108a00d7dbb0d7ac9891684fc83a3b207 (diff) | |
Reworked live SQL support yet again
Diffstat (limited to 'modules/commands/os_forbid.cpp')
| -rw-r--r-- | modules/commands/os_forbid.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/commands/os_forbid.cpp b/modules/commands/os_forbid.cpp index d305de3c6..bd67d13da 100644 --- a/modules/commands/os_forbid.cpp +++ b/modules/commands/os_forbid.cpp @@ -31,7 +31,7 @@ class MyForbidService : public ForbidService std::vector<ForbidData *>::iterator it = std::find(this->forbidData.begin(), this->forbidData.end(), d); if (it != this->forbidData.end()) this->forbidData.erase(it); - delete d; + d->destroy(); } ForbidData *FindForbid(const Anope::string &mask, ForbidType ftype) anope_override @@ -42,7 +42,7 @@ class MyForbidService : public ForbidService ForbidData *d = this->forbidData[i - 1]; if ((ftype == FT_NONE || ftype == d->type) && Anope::Match(mask, d->mask, false, true)) - return d; + d->destroy(); } return NULL; } @@ -65,7 +65,7 @@ class MyForbidService : public ForbidService Log(LOG_NORMAL, "expire/forbid") << "Expiring forbid for " << d->mask << " type " << ftype; this->forbidData.erase(this->forbidData.begin() + i - 1); - delete d; + d->destroy(); } } @@ -257,7 +257,7 @@ class OSForbid : public Module ForbidData *d = this->forbidService.FindForbid(u->nick, FT_NICK); if (d != NULL) { - BotInfo *bi = findbot(Config->OperServ); + const BotInfo *bi = findbot(Config->OperServ); if (bi) { if (d->reason.empty()) |
