summaryrefslogtreecommitdiff
path: root/src/commands/cmd_commands.cpp
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2013-05-18 17:18:12 +0100
committerPeter Powell <petpow@saberuk.com>2013-06-06 01:45:04 +0100
commit6f54bc95a483dfb7b6aaf0af02a1243d74e89f4c (patch)
tree3d9111ba971e75b26259fd38b0a5523de6038049 /src/commands/cmd_commands.cpp
parentbbeb5ea38686dfeb9537860770bbdb3bd2f9cd3f (diff)
Use InspIRCd::Format instead of snprintf().
Diffstat (limited to 'src/commands/cmd_commands.cpp')
-rw-r--r--src/commands/cmd_commands.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/commands/cmd_commands.cpp b/src/commands/cmd_commands.cpp
index 36408b363..99acdfe96 100644
--- a/src/commands/cmd_commands.cpp
+++ b/src/commands/cmd_commands.cpp
@@ -53,12 +53,9 @@ CmdResult CommandCommands::Handle (const std::vector<std::string>&, User *user)
continue;
Module* src = i->second->creator;
- char buffer[MAXBUF];
- snprintf(buffer, MAXBUF, ":%s %03d %s :%s %s %d %d",
- ServerInstance->Config->ServerName.c_str(), RPL_COMMANDS, user->nick.c_str(),
- i->second->name.c_str(), src->ModuleSourceFile.c_str(),
- i->second->min_params, i->second->Penalty);
- list.push_back(buffer);
+ list.push_back(InspIRCd::Format(":%s %03d %s :%s %s %d %d", ServerInstance->Config->ServerName.c_str(),
+ RPL_COMMANDS, user->nick.c_str(), i->second->name.c_str(), src->ModuleSourceFile.c_str(),
+ i->second->min_params, i->second->Penalty));
}
sort(list.begin(), list.end());
for(unsigned int i=0; i < list.size(); i++)