From 882b24c348d99f90f5e1e039a69b6eea1621a193 Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Tue, 7 May 2013 08:49:57 +0000
Subject: [PATCH] Enhancement for Nightfox: set smb.subnum before launching
 message editor, thus allowing external JS message editors to accurately use
 the bbs.smb_sub* properties to get information about the current sub-board
 being posted to.

---
 src/sbbs3/writemsg.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/sbbs3/writemsg.cpp b/src/sbbs3/writemsg.cpp
index d7d0f8b623..0b7dbe8736 100644
--- a/src/sbbs3/writemsg.cpp
+++ b/src/sbbs3/writemsg.cpp
@@ -409,6 +409,8 @@ bool sbbs_t::writemsg(const char *fname, const char *top, char *title, long mode
 		return(false); 
 	}
 
+	smb.subnum = subnum;	/* Allow JS msgeditors to use bbs.smb_sub* */
+
 	if(console&CON_RAW_IN) {
 		bprintf(text[EnterMsgNowRaw]
 			,(ulong)cfg.level_linespermsg[useron_level]*MAX_LINE_LEN);
-- 
GitLab