diff options
| author | 2023-01-23 07:42:07 +0000 | |
|---|---|---|
| committer | 2023-01-23 13:07:53 +0000 | |
| commit | 5c4badf8ea3ba775854f0d26d3f2e0e119584faa (patch) | |
| tree | 05dd2c5c545f12f71866be6422146477ddd30e3f /src/modules/m_httpd.cpp | |
| parent | Vendor the fmtlib library. (diff) | |
Replace InspIRCd::Format with fmt::format.
Diffstat (limited to 'src/modules/m_httpd.cpp')
| -rw-r--r-- | src/modules/m_httpd.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp index 29c6ff41e..72af19738 100644 --- a/src/modules/m_httpd.cpp +++ b/src/modules/m_httpd.cpp @@ -256,9 +256,9 @@ public: ServerInstance->Logs.Debug(MODNAME, "Sending HTTP error %u: %s", response, errstr); static HTTPHeaders empty; - std::string data = InspIRCd::Format( + std::string data = INSP_FORMAT( "<html><head></head><body style='font-family: sans-serif; text-align: center'>" - "<h1 style='font-size: 48pt'>Error %u</h1><h2 style='font-size: 24pt'>%s</h2><hr>" + "<h1 style='font-size: 48pt'>Error {}</h1><h2 style='font-size: 24pt'>{}</h2><hr>" "<small>Powered by <a href='https://www.inspircd.org'>InspIRCd</a></small></body></html>", response, errstr); @@ -267,7 +267,7 @@ public: void SendHeaders(unsigned long size, unsigned int response, HTTPHeaders& rheaders) { - WriteData(InspIRCd::Format("HTTP/%u.%u %u %s\r\n", parser.http_major ? parser.http_major : 1, parser.http_major ? parser.http_minor : 1, response, http_status_str((http_status)response))); + WriteData(INSP_FORMAT("HTTP/{}.{} {} {}\r\n", parser.http_major ? parser.http_major : 1, parser.http_major ? parser.http_minor : 1, response, http_status_str((http_status)response))); rheaders.CreateHeader("Date", InspIRCd::TimeString(ServerInstance->Time(), "%a, %d %b %Y %H:%M:%S GMT", true)); rheaders.CreateHeader("Server", INSPIRCD_BRANCH); |
