summaryrefslogtreecommitdiff
path: root/modules/commands/cs_clone.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-04-23 05:08:26 -0400
committerAdam <Adam@anope.org>2012-04-23 05:08:26 -0400
commit573e49a7ead331219eb6f0d3ca9cf83e793a5c9c (patch)
treee145e04fa3d041cf92ce46da4ac790b63231059c /modules/commands/cs_clone.cpp
parent63c639e108a00d7dbb0d7ac9891684fc83a3b207 (diff)
Reworked live SQL support yet again
Diffstat (limited to 'modules/commands/cs_clone.cpp')
-rw-r--r--modules/commands/cs_clone.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/modules/commands/cs_clone.cpp b/modules/commands/cs_clone.cpp
index 1676c70f6..be6907b81 100644
--- a/modules/commands/cs_clone.cpp
+++ b/modules/commands/cs_clone.cpp
@@ -41,6 +41,7 @@ public:
source.Reply(ACCESS_DENIED);
return;
}
+
ChannelInfo *target_ci = cs_findchan(target);
if (!target_ci)
{
@@ -58,10 +59,10 @@ public:
if (what.empty())
{
- delete target_ci;
+ target_ci->destroy();
target_ci = new ChannelInfo(*ci);
target_ci->name = target;
- RegisteredChannelList[target_ci->name] = target_ci;
+ (*RegisteredChannelList)[target_ci->name] = target_ci;
target_ci->c = findchan(target_ci->name);
if (target_ci->c)
{
@@ -107,7 +108,7 @@ public:
{
for (unsigned i = 0; i < ci->GetAccessCount(); ++i)
{
- ChanAccess *taccess = ci->GetAccess(i);
+ const ChanAccess *taccess = ci->GetAccess(i);
AccessProvider *provider = taccess->provider;
ChanAccess *newaccess = provider->Create();
@@ -128,7 +129,7 @@ public:
target_ci->ClearAkick();
for (unsigned i = 0; i < ci->GetAkickCount(); ++i)
{
- AutoKick *akick = ci->GetAkick(i);
+ const AutoKick *akick = ci->GetAkick(i);
if (akick->HasFlag(AK_ISNICK))
target_ci->AddAkick(akick->creator, akick->nc, akick->reason, akick->addtime, akick->last_used);
else
@@ -142,7 +143,7 @@ public:
target_ci->ClearBadWords();
for (unsigned i = 0; i < ci->GetBadWordCount(); ++i)
{
- BadWord *bw = ci->GetBadWord(i);
+ const BadWord *bw = ci->GetBadWord(i);
target_ci->AddBadWord(bw->word, bw->type);
}