1
0
mirror of https://github.com/anope/anope.git synced 2026-06-25 21:46:37 +02:00
Files
anope/modules/webcpanel/template_fileserver.h
T
Sadie Powell 7d1047490e Consistently use #pragma once across all header files.
This replaces a mixture of no include guards, ANOPE_FOO_H, and FOO_H.
2022-01-04 12:10:32 +00:00

29 lines
662 B
C++

/*
* (C) 2003-2021 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*/
#pragma once
#include "modules/httpd.h"
/* A basic file server. Used for serving non-static non-binary content on disk. */
class TemplateFileServer
{
Anope::string file_name;
public:
struct Replacements : std::multimap<Anope::string, Anope::string>
{
Anope::string& operator[](const Anope::string &key)
{
return insert(std::make_pair(key, ""))->second;
}
};
TemplateFileServer(const Anope::string &f_n);
void Serve(HTTPProvider *, const Anope::string &, HTTPClient *, HTTPMessage &, HTTPReply &, Replacements &);
};