blob: c5ab749c06a136596395b8047c88f136fa205e6f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
/*
* (C) 2003-2025 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 final
{
Anope::string file_name;
public:
struct Replacements final
: std::multimap<Anope::string, Anope::string>
{
Anope::string &operator[](const Anope::string &key)
{
return emplace(key, "")->second;
}
};
TemplateFileServer(const Anope::string &f_n);
void Serve(HTTP::Provider *, const Anope::string &, HTTP::Client *, HTTP::Message &, HTTP::Reply &, Replacements &);
};
|