+#endif
+ int overrun = lastParamOverrun(cmd, QList<QByteArray>() << target << crypted);
+ if(overrun) {
+ // In case this is not an encrypted msg, we can just cut off at the end
+ if(!isEncrypted)
+ maxSplitPos = message.count() - overrun;
+
+ splitPos = -1;
+ for(const char *splitChar = splitter; *splitChar != 0; splitChar++) {
+ splitPos = qMax(splitPos, message.lastIndexOf(*splitChar, maxSplitPos) + 1); // keep split char on old line
+ }
+ if(splitPos <= 0 || splitPos > maxSplitPos)
+ splitPos = maxSplitPos;
+
+ maxSplitPos = splitPos - 1;
+ if(maxSplitPos <= 0) { // this should never happen, but who knows...
+ qWarning() << tr("[Error] Could not encrypt your message: %1").arg(message.data());
+ return;
+ }
+ continue; // we never come back here for !encrypted!