-#define SEND_LINE() do { line[pos] = 0; if (pos > 0) irc_send(src, dest, line); chars_sent += pos; pos = 0; newline_ipos = ipos; } while (0)
+#define SEND_LINE(TRUNCED) do { \
+ line[pos] = 0; \
+ if (pos > 0) { \
+ if (!(msg_type & MSG_TYPE_MULTILINE) && (pos > 1) && TRUNCED) \
+ line[pos-2] = line[pos-1] = '.'; \
+ irc_send(src, dest, line); \
+ } \
+ chars_sent += pos; \
+ pos = 0; \
+ newline_ipos = ipos; \
+ if (!(msg_type & MSG_TYPE_MULTILINE)) return chars_sent; \
+} while (0)