summaryrefslogtreecommitdiff
path: root/modules/commands/cs_sync.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-09-03 01:29:57 -0400
committerAdam <Adam@anope.org>2011-09-03 01:29:57 -0400
commit073db54354c8b16e099f9e6ee54d388aabb8fc8d (patch)
tree3266dfd65cfccda900dce0da2d287d8fcad8277e /modules/commands/cs_sync.cpp
parentef10b5a834c2dff563f3a1a8e465d387405a7bbc (diff)
Added permission check in cs_sync
Diffstat (limited to 'modules/commands/cs_sync.cpp')
-rw-r--r--modules/commands/cs_sync.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/commands/cs_sync.cpp b/modules/commands/cs_sync.cpp
index 29c3e6ef4..5c5c51fee 100644
--- a/modules/commands/cs_sync.cpp
+++ b/modules/commands/cs_sync.cpp
@@ -22,12 +22,15 @@ class CommandCSSync : public Command
void Execute(CommandSource &source, const std::vector<Anope::string> &params)
{
+ User *u = source.u;
ChannelInfo *ci = cs_findchan(params[0]);
if (ci == NULL)
source.Reply(CHAN_X_NOT_REGISTERED, params[0].c_str());
else if (ci->c == NULL)
source.Reply(CHAN_X_NOT_IN_USE, params[0].c_str());
+ else if (!ci->AccessFor(u).HasPriv(CA_ACCESS_CHANGE))
+ source.Reply(ACCESS_DENIED);
else
{
for (CUserList::iterator it = ci->c->users.begin(), it_end = ci->c->users.end(); it != it_end; ++it)