From 073db54354c8b16e099f9e6ee54d388aabb8fc8d Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 3 Sep 2011 01:29:57 -0400 Subject: Added permission check in cs_sync --- modules/commands/cs_sync.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'modules/commands/cs_sync.cpp') 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 ¶ms) { + 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) -- cgit