Bug 98730 - Konversation does not warn or display properly outgoing messages that are too long
Summary: Konversation does not warn or display properly outgoing messages that are too...
Status: RESOLVED FIXED
Alias: None
Product: konversation
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Konversation Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-06 23:24 UTC by Jason Keirstead
Modified: 2010-07-01 16:00 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Keirstead 2005-02-06 23:24:02 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources

If you type a really long message into the send box, Konversation *looks* like it sent it fine (it appends the whole message), but the server has actually truncated it, and the message everyone else receives is incomplete.

The message should probably at least be truncated in your view the same as it is on other clients.
Comment 1 Peter Simonsson 2005-03-20 15:26:50 UTC
CVS commit by psn: 

Handle normal messages that are longer then 512 chars

BUG:98730


  M +10 -0     outputfilter.cpp   1.146


--- kdeextragear-2/konversation/konversation/outputfilter.cpp  #1.145:1.146
@@ -126,4 +126,9 @@ namespace Konversation {
         {
             result.toServer = "PRIVMSG " + name + " :" + inputLine.mid(1);
+
+            for(int i = 508; i < result.toServer.length(); i += 509) {
+                result.toServer.insert(i, "\nPRIVMSG " + destination + " :");
+            }
+
             result.output = inputLine.mid(1);
             result.type = Message;
@@ -197,4 +202,9 @@ namespace Konversation {
         {
             result.toServer = "PRIVMSG " + destination + " :" + inputLine;
+
+            for(int i = 508; i < result.toServer.length(); i += 509) {
+                result.toServer.insert(i, "\nPRIVMSG " + destination + " :");
+            }
+
             result.output = inputLine;
             result.type = Message;
Comment 2 Peter Simonsson 2010-07-01 16:00:32 UTC
commit c6ee78da5d689f29d1d2f61abe2264709cb5c3a8
Author: Peter Simonsson <peter.simonsson@gmail.com>
Date:   Sun Mar 20 14:26:44 2005 +0000

    Handle normal messages that are longer then 512 chars
    
    BUG:98730
    
    svn path=/trunk/kdeextragear-2/konversation/; revision=399208

diff --git a/konversation/outputfilter.cpp b/konversation/outputfilter.cpp
index a58e1b7..6c9cb83 100644
--- a/konversation/outputfilter.cpp
+++ b/konversation/outputfilter.cpp
@@ -125,6 +125,11 @@ namespace Konversation {
         else if(line.startsWith(commandChar+commandChar) && !destination.isEmpty())
         {
             result.toServer = "PRIVMSG " + name + " :" + inputLine.mid(1);
+
+            for(int i = 508; i < result.toServer.length(); i += 509) {
+                result.toServer.insert(i, "\nPRIVMSG " + destination + " :");
+            }
+
             result.output = inputLine.mid(1);
             result.type = Message;
         }
@@ -196,6 +201,11 @@ namespace Konversation {
         else if(!destination.isEmpty())
         {
             result.toServer = "PRIVMSG " + destination + " :" + inputLine;
+
+            for(int i = 508; i < result.toServer.length(); i += 509) {
+                result.toServer.insert(i, "\nPRIVMSG " + destination + " :");
+            }
+
             result.output = inputLine;
             result.type = Message;
         }