Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
...@@ -122,7 +122,6 @@ void sbbs_t::show_msghdr(smbmsg_t* msg) ...@@ -122,7 +122,6 @@ void sbbs_t::show_msghdr(smbmsg_t* msg)
char *sender=NULL; char *sender=NULL;
int i; int i;
current_msg=msg;
attr(LIGHTGRAY); attr(LIGHTGRAY);
if(useron.misc&CLRSCRN) if(useron.misc&CLRSCRN)
outchar(FF); outchar(FF);
...@@ -132,7 +131,6 @@ void sbbs_t::show_msghdr(smbmsg_t* msg) ...@@ -132,7 +131,6 @@ void sbbs_t::show_msghdr(smbmsg_t* msg)
sprintf(str,"%smenu/msghdr.*", cfg.text_dir); sprintf(str,"%smenu/msghdr.*", cfg.text_dir);
if(fexist(str)) { if(fexist(str)) {
menu("msghdr"); menu("msghdr");
current_msg=NULL;
return; return;
} }
...@@ -165,16 +163,7 @@ void sbbs_t::show_msghdr(smbmsg_t* msg) ...@@ -165,16 +163,7 @@ void sbbs_t::show_msghdr(smbmsg_t* msg)
bprintf(text[ForwardedFrom],sender bprintf(text[ForwardedFrom],sender
,timestr(*(time32_t *)msg->hfield_dat[i])); ,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; CRLF;
current_msg=NULL;
} }
/****************************************************************************/ /****************************************************************************/
......
...@@ -168,6 +168,7 @@ void sbbs_t::readmail(uint usernumber, int which) ...@@ -168,6 +168,7 @@ void sbbs_t::readmail(uint usernumber, int which)
"allmail" : "sentmail"); "allmail" : "sentmail");
menu(str); menu(str);
} }
current_msg=&msg; /* For MSG_* @-codes and bbs.msg_* property values */
while(online && !done) { while(online && !done) {
action=act; action=act;
...@@ -768,5 +769,6 @@ void sbbs_t::readmail(uint usernumber, int which) ...@@ -768,5 +769,6 @@ void sbbs_t::readmail(uint usernumber, int which)
smb_close(&smb); smb_close(&smb);
smb_stack(&smb,SMB_STACK_POP); smb_stack(&smb,SMB_STACK_POP);
current_msg=NULL;
} }
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * @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 * * This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License * * 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) ...@@ -495,6 +495,7 @@ int sbbs_t::scanposts(uint subnum, long mode, const char *find)
thisnode.action=NODE_RMSG; thisnode.action=NODE_RMSG;
putnodedat(cfg.node_num,&thisnode); putnodedat(cfg.node_num,&thisnode);
} }
current_msg=&msg; /* For MSG_* @-codes and bbs.msg_* property values */
while(online && !done) { while(online && !done) {
action=NODE_RMSG; action=NODE_RMSG;
...@@ -753,6 +754,7 @@ int sbbs_t::scanposts(uint subnum, long mode, const char *find) ...@@ -753,6 +754,7 @@ int sbbs_t::scanposts(uint subnum, long mode, const char *find)
free(post); free(post);
smb_close(&smb); smb_close(&smb);
smb_stack(&smb,SMB_STACK_POP); smb_stack(&smb,SMB_STACK_POP);
current_msg=NULL;
return(0); return(0);
case 'C': /* Continuous */ case 'C': /* Continuous */
mode|=SCAN_CONST; mode|=SCAN_CONST;
...@@ -1185,6 +1187,7 @@ int sbbs_t::scanposts(uint subnum, long mode, const char *find) ...@@ -1185,6 +1187,7 @@ int sbbs_t::scanposts(uint subnum, long mode, const char *find)
subscan[subnum].cfg|=SUB_CFG_NSCAN; subscan[subnum].cfg|=SUB_CFG_NSCAN;
smb_close(&smb); smb_close(&smb);
smb_stack(&smb,SMB_STACK_POP); smb_stack(&smb,SMB_STACK_POP);
current_msg=NULL;
return(quit); return(quit);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment