1
0
mirror of https://github.com/anope/anope.git synced 2026-07-01 11:06:38 +02:00

Added permission check in cs_sync

This commit is contained in:
Adam
2011-09-03 01:29:57 -04:00
parent ef10b5a834
commit 073db54354
+3
View File
@@ -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)