diff options
author | Peter Powell <petpow@saberuk.com> | 2013-05-18 17:18:12 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2013-06-06 01:45:04 +0100 |
commit | 6f54bc95a483dfb7b6aaf0af02a1243d74e89f4c (patch) | |
tree | 3d9111ba971e75b26259fd38b0a5523de6038049 /src/users.cpp | |
parent | bbeb5ea38686dfeb9537860770bbdb3bd2f9cd3f (diff) |
Use InspIRCd::Format instead of snprintf().
Diffstat (limited to 'src/users.cpp')
-rw-r--r-- | src/users.cpp | 8 |
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) |