From 8282fa35b8c9b88a7c155d68bf462f499c79fe68 Mon Sep 17 00:00:00 2001
From: deuce <>
Date: Mon, 6 Mar 2006 00:14:22 +0000
Subject: [PATCH] Add support for a thirt quote initial (ie: TLM> )

---
 src/sbbs3/js_global.c | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/src/sbbs3/js_global.c b/src/sbbs3/js_global.c
index 5fea9ec598..c5c0f3f607 100644
--- a/src/sbbs3/js_global.c
+++ b/src/sbbs3/js_global.c
@@ -701,7 +701,7 @@ js_word_wrap(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
 										t=0;
 									else {
 										if(inbuf[i+tmp_prefix_bytes]=='>')
-											t=5;
+											t=6;
 										else
 											t++;
 									}
@@ -709,18 +709,26 @@ js_word_wrap(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
 								case 3:		/* At second nick initial (next char should be alphanum or '>') */
 									if(inbuf[i+tmp_prefix_bytes]==' ' || inbuf[i+tmp_prefix_bytes]==0)
 										t=0;
-									else if(inbuf[i+tmp_prefix_bytes]=='>')
-										t=5;
+									else {
+										if(inbuf[i+tmp_prefix_bytes]=='>')
+											t=6;
+										else
+											t++;
+									}
+									break;
+								case 4:		/* At third nick initial (next char should be alphanum or '>') */
+									if(inbuf[i+tmp_prefix_bytes]!='>')
+										t=0;
 									else
 										t++;
 									break;
-								case 4:		/* After two regular chars, next HAS to be a '>') */
+								case 5:		/* After three regular chars, next HAS to be a '>') */
 									if(inbuf[i+tmp_prefix_bytes]!='>')
 										t=0;
 									else
 										t++;
 									break;
-								case 5:		/* At '>' next char must be a space */
+								case 6:		/* At '>' next char must be a space */
 									if(inbuf[i+tmp_prefix_bytes]!=' ')
 										t=0;
 									else {
-- 
GitLab