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_news.cpp | |
parent | 63c639e108a00d7dbb0d7ac9891684fc83a3b207 (diff) |
Reworked live SQL support yet again
Diffstat (limited to 'modules/commands/os_news.cpp')
-rw-r--r-- | modules/commands/os_news.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/commands/os_news.cpp b/modules/commands/os_news.cpp index 268f2ef0d..456661c46 100644 --- a/modules/commands/os_news.cpp +++ b/modules/commands/os_news.cpp @@ -72,7 +72,7 @@ class MyNewsService : public NewsService { for (unsigned i = 0; i < 3; ++i) for (unsigned j = 0; j < newsItems[i].size(); ++j) - delete newsItems[i][j]; + newsItems[i][j]->destroy(); } void AddNewsItem(NewsItem *n) @@ -86,7 +86,7 @@ class MyNewsService : public NewsService std::vector<NewsItem *>::iterator it = std::find(list.begin(), list.end(), n); if (it != list.end()) list.erase(it); - delete n; + n->destroy(); } std::vector<NewsItem *> &GetNewsList(NewsType t) @@ -364,10 +364,10 @@ class OSNews : public Module if (Type == NEWS_RANDOM && i != cur_rand_news) continue; - BotInfo *gl = findbot(Config->Global); - if (!gl && !BotListByNick.empty()) - gl = BotListByNick.begin()->second; - BotInfo *os = findbot(Config->OperServ); + const BotInfo *gl = findbot(Config->Global); + if (!gl && !BotListByNick->empty()) + gl = BotListByNick->begin()->second; + const BotInfo *os = findbot(Config->OperServ); if (!os) os = gl; if (gl) |