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_gateway.cpp | |
| parent | Vendor the fmtlib library. (diff) | |
Replace InspIRCd::Format with fmt::format.
Diffstat (limited to 'src/modules/m_gateway.cpp')
| -rw-r--r-- | src/modules/m_gateway.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/modules/m_gateway.cpp b/src/modules/m_gateway.cpp index a68ea5a07..bb6b23abe 100644 --- a/src/modules/m_gateway.cpp +++ b/src/modules/m_gateway.cpp @@ -150,21 +150,20 @@ public: } uint32_t addr = sa.in4.sin_addr.s_addr; - user->WriteNotice(InspIRCd::Format("*** HEXIP: %s encodes to %02x%02x%02x%02x.", - sa.addr().c_str(), (addr & 0xFF), ((addr >> 8) & 0xFF), ((addr >> 16) & 0xFF), + user->WriteNotice(INSP_FORMAT("*** HEXIP: {} encodes to {:02x}{:02x}{:02x}{:02x}.", + sa.addr(), (addr & 0xFF), ((addr >> 8) & 0xFF), ((addr >> 16) & 0xFF), ((addr >> 24) & 0xFF))); return CmdResult::SUCCESS; } if (ParseIP(parameters[0], sa)) { - user->WriteNotice(InspIRCd::Format("*** HEXIP: %s decodes to %s.", - parameters[0].c_str(), sa.addr().c_str())); + user->WriteNotice(INSP_FORMAT("*** HEXIP: {} decodes to {}.", parameters[0], sa.addr())); return CmdResult::SUCCESS; } - user->WriteNotice(InspIRCd::Format("*** HEXIP: %s is not a valid raw or hex encoded IPv4 address.", - parameters[0].c_str())); + user->WriteNotice(INSP_FORMAT("*** HEXIP: {} is not a valid raw or hex encoded IPv4 address.", + parameters[0])); return CmdResult::FAILURE; } |
