From 18211d11d47dc5b3c89fa3ea5d50277c4063b1c4 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Thu, 1 Jan 2015 22:33:22 +0000 Subject: [PATCH] Added new @-codes MSG_AUXATTR and MSG_NETATTR to display the corresponding SMB message header fields (msg_auxattr and msg_netattr), as requested by AccessDenied, though most of these attribute flags are currently never set by anything. <shrug> --- src/sbbs3/atcodes.cpp | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/src/sbbs3/atcodes.cpp b/src/sbbs3/atcodes.cpp index fee8372516..3f3bd27fbd 100644 --- a/src/sbbs3/atcodes.cpp +++ b/src/sbbs3/atcodes.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 2011 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2014 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 * @@ -990,6 +990,38 @@ const char* sbbs_t::atcode(char* sp, char* str, size_t maxlen) ); return(str); } + if(!strcmp(sp,"MSG_AUXATTR") && current_msg!=NULL) { + safe_snprintf(str,maxlen,"%s%s%s%s%s%s%s" + ,current_msg->hdr.auxattr&MSG_FILEREQUEST ? "FileRequest " :nulstr + ,current_msg->hdr.auxattr&MSG_FILEATTACH ? "FileAttach " :nulstr + ,current_msg->hdr.auxattr&MSG_TRUNCFILE ? "TruncFile " :nulstr + ,current_msg->hdr.auxattr&MSG_KILLFILE ? "KillFile " :nulstr + ,current_msg->hdr.auxattr&MSG_RECEIPTREQ ? "ReceiptReq " :nulstr + ,current_msg->hdr.auxattr&MSG_CONFIRMREQ ? "ConfirmReq " :nulstr + ,current_msg->hdr.auxattr&MSG_NODISP ? "DontDisplay " :nulstr + ); + return(str); + } + if(!strcmp(sp,"MSG_NETATTR") && current_msg!=NULL) { + safe_snprintf(str,maxlen,"%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s" + ,current_msg->hdr.netattr&MSG_LOCAL ? "Local " :nulstr + ,current_msg->hdr.netattr&MSG_INTRANSIT ? "InTransit " :nulstr + ,current_msg->hdr.netattr&MSG_SENT ? "Sent " :nulstr + ,current_msg->hdr.netattr&MSG_KILLSENT ? "KillSent " :nulstr + ,current_msg->hdr.netattr&MSG_ARCHIVESENT ? "ArcSent " :nulstr + ,current_msg->hdr.netattr&MSG_HOLD ? "Hold " :nulstr + ,current_msg->hdr.netattr&MSG_CRASH ? "Crash " :nulstr + ,current_msg->hdr.netattr&MSG_IMMEDIATE ? "Immediate " :nulstr + ,current_msg->hdr.netattr&MSG_DIRECT ? "Direct " :nulstr + ,current_msg->hdr.netattr&MSG_GATE ? "Gate " :nulstr + ,current_msg->hdr.netattr&MSG_ORPHAN ? "Orphan " :nulstr + ,current_msg->hdr.netattr&MSG_FPU ? "ForcePickup " :nulstr + ,current_msg->hdr.netattr&MSG_TYPELOCAL ? "LocalUse " :nulstr + ,current_msg->hdr.netattr&MSG_TYPEECHO ? "EchoMail " :nulstr + ,current_msg->hdr.netattr&MSG_TYPENET ? "NetMail " :nulstr + ); + return(str); + } if(!strcmp(sp,"MSG_ID") && current_msg!=NULL) return(current_msg->id==NULL ? nulstr : current_msg->id); if(!strcmp(sp,"MSG_REPLY_ID") && current_msg!=NULL) -- GitLab