1
0
mirror of https://github.com/anope/anope.git synced 2026-07-05 08:13:13 +02:00
Files
anope/modules/extra/webcpanel/pages/chanserv/utils.cpp
T
Adam 4691351167 Cleanup previous commit
Fix log messages from commands send through webpanel
Don't show OperServ section to non opers
2013-09-03 18:51:18 -04:00

36 lines
647 B
C++

/*
* (C) 2003-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*/
#include "../../webcpanel.h"
namespace WebCPanel
{
namespace ChanServ
{
void BuildChanList(NickAlias *na, TemplateFileServer::Replacements &replacements)
{
std::deque<ChannelInfo *> queue;
na->nc->GetChannelReferences(queue);
for (unsigned i = 0; i < queue.size(); ++i)
{
ChannelInfo *ci = queue[i];
if (na->nc != ci->GetFounder() && ci->AccessFor(na->nc).empty())
continue;
replacements["CHANNEL_NAMES"] = ci->name;
replacements["ESCAPED_CHANNEL_NAMES"] = HTTPUtils::URLEncode(ci->name);
}
}
}
}