Commit 6741fe64 authored by rswindell's avatar rswindell
Browse files

Modification to allow JS bbs.msg_* properties (and MSG_* @-codes) to be used in

places other than just viewing a message header - for use in Nightfox's SlyEdit.
parent 52a28bba
......@@ -122,7 +122,6 @@ void sbbs_t::show_msghdr(smbmsg_t* msg)
char *sender=NULL;
int i;
current_msg=msg;
attr(LIGHTGRAY);
if(useron.misc&CLRSCRN)
outchar(FF);
......@@ -132,7 +131,6 @@ void sbbs_t::show_msghdr(smbmsg_t* msg)
sprintf(str,"%smenu/msghdr.*", cfg.text_dir);
if(fexist(str)) {
menu("msghdr");
current_msg=NULL;
return;
}
......@@ -165,16 +163,7 @@ void sbbs_t::show_msghdr(smbmsg_t* msg)
bprintf(text[ForwardedFrom],sender
,timestr(*(time32_t *)msg->hfield_dat[i]));
}
/* Debug stuff
if(SYSOP) {
bprintf("\1n\1c\r\nAux : \1h%08lX",msg->hdr.auxattr);
bprintf("\1n\1c\r\nNum : \1h%lu",msg->hdr.number);
}
*/
CRLF;
current_msg=NULL;
}
/****************************************************************************/
......
......@@ -168,6 +168,7 @@ void sbbs_t::readmail(uint usernumber, int which)
"allmail" : "sentmail");
menu(str);
}
current_msg=&msg; /* For MSG_* @-codes and bbs.msg_* property values */
while(online && !done) {
action=act;
......@@ -768,5 +769,6 @@ void sbbs_t::readmail(uint usernumber, int which)
smb_close(&smb);
smb_stack(&smb,SMB_STACK_POP);
current_msg=NULL;
}
......@@ -8,7 +8,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* Copyright 2012 Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 2013 Rob Swindell - http://www.synchro.net/copyright.html *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
......@@ -495,6 +495,7 @@ int sbbs_t::scanposts(uint subnum, long mode, const char *find)
thisnode.action=NODE_RMSG;
putnodedat(cfg.node_num,&thisnode);
}
current_msg=&msg; /* For MSG_* @-codes and bbs.msg_* property values */
while(online && !done) {
action=NODE_RMSG;
......@@ -753,6 +754,7 @@ int sbbs_t::scanposts(uint subnum, long mode, const char *find)
free(post);
smb_close(&smb);
smb_stack(&smb,SMB_STACK_POP);
current_msg=NULL;
return(0);
case 'C': /* Continuous */
mode|=SCAN_CONST;
......@@ -1185,6 +1187,7 @@ int sbbs_t::scanposts(uint subnum, long mode, const char *find)
subscan[subnum].cfg|=SUB_CFG_NSCAN;
smb_close(&smb);
smb_stack(&smb,SMB_STACK_POP);
current_msg=NULL;
return(quit);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment