summaryrefslogtreecommitdiff
path: root/src/modules.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules.cpp')
-rw-r--r--src/modules.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/modules.cpp b/src/modules.cpp
index a267662df..437da4026 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -566,6 +566,22 @@ bool Server::CommonChannels(userrec* u1, userrec* u2)
return (common_channels(u1,u2) != 0);
}
+void Server::DumpText(userrec* User, std::string LinePrefix, stringstream &TextStream)
+{
+ std::string CompleteLine = LinePrefix;
+ std::string Word = "";
+ while (TextStream >> Word)
+ {
+ if (CompleteLine.length() + Word.length() + 3 > 500)
+ {
+ WriteServ_NoFormat(User->fd,CompleteLine.c_str());
+ CompleteLine = LinePrefix;
+ }
+ CompleteLine = CompleteLine + Word + " ";
+ }
+ WriteServ_NoFormat(User->fd,CompleteLine.c_str());
+}
+
void Server::SendCommon(userrec* User, std::string text,bool IncludeSender)
{
if (IncludeSender)