From 890ae04c76f1539be2ec59c6e46c786e8f6f388f Mon Sep 17 00:00:00 2001 From: nenolod Date: Mon, 2 Oct 2006 13:01:14 +0000 Subject: 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 --- src/modules/m_remove.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/modules') 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()); -- cgit v1.2.3