diff options
author | Attila Molnar <attilamolnar@hush.com> | 2016-03-30 12:34:41 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2016-03-30 12:34:41 +0200 |
commit | c0cd24b658a6e98b40c094d468cd1a405f37b7ad (patch) | |
tree | d3666173e7a3fe239b64d2c94fb804571d377257 /src/modules | |
parent | 514a9edadf19d01ac80a9ef7b8b05054e7d4786b (diff) |
m_showfile Replace User::SendText() call with WriteCommand()
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_showfile.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/modules/m_showfile.cpp b/src/modules/m_showfile.cpp index 9973bf2b6..57c501e90 100644 --- a/src/modules/m_showfile.cpp +++ b/src/modules/m_showfile.cpp @@ -44,7 +44,6 @@ class CommandShowFile : public Command CmdResult Handle(const std::vector<std::string>& parameters, User* user) CXX11_OVERRIDE { - const std::string& sn = ServerInstance->Config->ServerName; if (method == SF_NUMERIC) { if (!introtext.empty()) @@ -58,9 +57,11 @@ class CommandShowFile : public Command else { const char* msgcmd = (method == SF_MSG ? "PRIVMSG" : "NOTICE"); - std::string header = InspIRCd::Format(":%s %s %s :", sn.c_str(), msgcmd, user->nick.c_str()); for (file_cache::const_iterator i = contents.begin(); i != contents.end(); ++i) - user->SendText(header + *i); + { + const std::string& line = *i; + user->WriteCommand(msgcmd, ":" + line); + } } return CMD_SUCCESS; } |