diff options
author | nenolod <nenolod@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-10-02 13:01:14 +0000 |
---|---|---|
committer | nenolod <nenolod@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-10-02 13:01:14 +0000 |
commit | 890ae04c76f1539be2ec59c6e46c786e8f6f388f (patch) | |
tree | 7ecedcddbd073ffdf5844ef0d8a5ff149084bc28 /src/modules | |
parent | f0e0cb4da6fb8ccd2126ebca7d1105bcf72bc5fd (diff) |
no you can't just go from a std::ostringstream to a std::string, Om. *thwap*
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5396 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_remove.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/modules/m_remove.cpp b/src/modules/m_remove.cpp index 2b237c08e..9966fbfb3 100644 --- a/src/modules/m_remove.cpp +++ b/src/modules/m_remove.cpp @@ -87,7 +87,7 @@ class RemoveBase chanrec* channel; ModeLevel tlevel; ModeLevel ulevel; - std::ostringstream reason; + std::string reason; std::string protectkey; std::string founderkey; bool hasnokicks; @@ -179,6 +179,8 @@ class RemoveBase */ if ((ulevel > PEON) && (ulevel >= tlevel) && (tlevel != OWNER)) { + // no you can't just go from a std::ostringstream to a std::string, Om. -nenolod + std::ostringstream reason_stream; std::string reasonparam; /* If a reason is given, use it */ @@ -187,15 +189,15 @@ class RemoveBase /* Use all the remaining parameters as the reason */ for(int i = 2; i < pcnt; i++) { - reason << " " << parameters[i]; + reason_stream << " " << parameters[i]; } - reasonparam = reason.str(); - reason.clear(); + reasonparam = reason_stream.str(); + reason_stream.clear(); } /* Build up the part reason string. */ - reason << "Removed by " << user->nick << reasonparam; + reason = "Removed by " + user->nick + ": " + reasonparam; channel->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s removed %s from the channel", channel->name, user->nick, target->nick); target->WriteServ("NOTICE %s :*** %s removed you from %s with the message: %s", target->nick, user->nick, channel->name, reasonparam.c_str()); |