summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-26 12:44:54 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-26 12:44:54 +0000
commit16ea016846dae51a71080934a5e52e66da512027 (patch)
tree88a9d4ad5e6907008efb10e3f42a8c34fca60188 /src
parentc1c9dfe2bfc431348d4c3c71c35d3088532a3a9c (diff)
Eliminate string joining craq
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9811 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_swhois.cpp13
1 files changed, 2 insertions, 11 deletions
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 = "<nick> <swhois>";
+ syntax = "<nick> :<swhois>";
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 -