summaryrefslogtreecommitdiff
path: root/src/users.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/users.cpp b/src/users.cpp
index cd458f68e..a12b322b7 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -1051,16 +1051,16 @@ void User::WriteNumeric(unsigned int numeric, const char* text, ...)
void User::WriteNumeric(unsigned int numeric, const std::string &text)
{
- char textbuffer[MAXBUF];
ModResult MOD_RESULT;
FIRST_MOD_RESULT(OnNumeric, MOD_RESULT, (this, numeric, text));
if (MOD_RESULT == MOD_RES_DENY)
return;
-
- snprintf(textbuffer,MAXBUF,":%s %03u %s",ServerInstance->Config->ServerName.c_str(), numeric, text.c_str());
- this->Write(std::string(textbuffer));
+
+ const std::string message = InspIRCd::Format(":%s %03u %s", ServerInstance->Config->ServerName.c_str(),
+ numeric, text.c_str());
+ this->Write(message);
}
void User::WriteFrom(User *user, const std::string &text)