From 16ea016846dae51a71080934a5e52e66da512027 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 26 May 2008 12:44:54 +0000 Subject: Eliminate string joining craq git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9811 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_swhois.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'src/modules/m_swhois.cpp') diff --git a/src/modules/m_swhois.cpp b/src/modules/m_swhois.cpp index b2de8d288..3a82174ec 100644 --- a/src/modules/m_swhois.cpp +++ b/src/modules/m_swhois.cpp @@ -24,7 +24,7 @@ class CommandSwhois : public Command CommandSwhois (InspIRCd* Instance) : Command(Instance,"SWHOIS","o",2) { this->source = "m_swhois.so"; - syntax = " "; + syntax = " :"; TRANSLATE3(TR_NICK, TR_TEXT, TR_END); } @@ -37,15 +37,6 @@ class CommandSwhois : public Command user->WriteNumeric(401, "%s %s :No such nick/channel", user->nick.c_str(), parameters[0].c_str()); return CMD_FAILURE; } - - std::string line; - for (int i = 1; i < (int)parameters.size(); i++) - { - if (i != 1) - line.append(" "); - - line.append(parameters[i]); - } std::string* text; dest->GetExt("swhois", text); @@ -66,7 +57,7 @@ class CommandSwhois : public Command ServerInstance->SNO->WriteToSnoMask('A', "%s used SWHOIS to set %s's extra whois to '%s'", user->nick.c_str(), dest->nick.c_str(), line.c_str()); } - text = new std::string(line); + text = new std::string(parameters[0]); dest->Extend("swhois", text); /* Bug #376 - feature request - -- cgit v1.2.3