summaryrefslogtreecommitdiff
path: root/modules/chanserv/sync.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/chanserv/sync.cpp')
-rw-r--r--modules/chanserv/sync.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/chanserv/sync.cpp b/modules/chanserv/sync.cpp
index 117003577..0ff7ebdd0 100644
--- a/modules/chanserv/sync.cpp
+++ b/modules/chanserv/sync.cpp
@@ -39,7 +39,8 @@ class CommandCSSync : public Command
return;
}
- if (ci->c == NULL)
+ Channel *c = ci->GetChannel();
+ if (c == nullptr)
{
source.Reply(_("Channel \002{0}\002 doesn't exist."), ci->GetName());
return;
@@ -53,8 +54,8 @@ class CommandCSSync : public Command
logger.Command(source, ci, _("{source} used {command} on {channel}"));
- for (Channel::ChanUserList::iterator it = ci->c->users.begin(), it_end = ci->c->users.end(); it != it_end; ++it)
- ci->c->SetCorrectModes(it->second->user, true);
+ for (Channel::ChanUserList::iterator it = c->users.begin(), it_end = c->users.end(); it != it_end; ++it)
+ c->SetCorrectModes(it->second->user, true);
source.Reply(_("All user modes on \002{0}\002 have been synced."));
}