diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-10-03 13:46:28 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-10-03 13:46:28 +0000 |
commit | 9716d24be9e3e567308f6d144a65eeaccd65484a (patch) | |
tree | 78d19137cdc1a87133741c65c397207651f7d4f1 /src/modules/m_saquit.cpp | |
parent | ab58b38578dfaeda2f53ba84e475ed9638e5f6da (diff) |
New helper class irc::stringjoiner - it pwns you.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5403 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_saquit.cpp')
-rw-r--r-- | src/modules/m_saquit.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/modules/m_saquit.cpp b/src/modules/m_saquit.cpp index 54eaf7ea8..20ffdd99e 100644 --- a/src/modules/m_saquit.cpp +++ b/src/modules/m_saquit.cpp @@ -57,13 +57,9 @@ class cmd_saquit : public command_t user->WriteServ("990 %s :Cannot use an SA command on a u-lined client",user->nick); return CMD_FAILURE; } - std::string line = ""; - for (int i = 1; i < pcnt - 1; i++) - { - line = line + std::string(parameters[i]) + " "; - } - line = line + std::string(parameters[pcnt-1]); - + irc::stringjoiner reason_join(" ", parameters, 1, pcnt - 1); + std::string line = reason_join.GetJoined(); + ServerInstance->WriteOpers(std::string(user->nick)+" used SAQUIT to make "+std::string(dest->nick)+" quit with a reason of "+line); userrec::QuitUser(ServerInstance, dest, line); |