From 6f54bc95a483dfb7b6aaf0af02a1243d74e89f4c Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Sat, 18 May 2013 17:18:12 +0100 Subject: Use InspIRCd::Format instead of snprintf(). --- src/users.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/users.cpp') 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) -- cgit v1.3.1-10-gc9f91