diff --git a/src/sbbs3/getmsg.cpp b/src/sbbs3/getmsg.cpp index ffa3f974d8e58e5760e3f99194794e1307b040e2..6e0916a1a98b95ab60428e6ba738841400be82e1 100644 --- a/src/sbbs3/getmsg.cpp +++ b/src/sbbs3/getmsg.cpp @@ -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; } /****************************************************************************/ diff --git a/src/sbbs3/readmail.cpp b/src/sbbs3/readmail.cpp index e286dc7334cf92442c3fc9b408c21beedeccb10e..f84db9106a1153a7722101d78e3a67c717ca387a 100644 --- a/src/sbbs3/readmail.cpp +++ b/src/sbbs3/readmail.cpp @@ -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; } diff --git a/src/sbbs3/readmsgs.cpp b/src/sbbs3/readmsgs.cpp index a85c7c55376d2aa9975ba4336fcbc151e7bb505e..3d99ad990103f45251ce01293a633055c5a4a82f 100644 --- a/src/sbbs3/readmsgs.cpp +++ b/src/sbbs3/readmsgs.cpp @@ -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); }