diff --git a/src/sbbs3/putmsg.cpp b/src/sbbs3/putmsg.cpp
index dfe3f464cc1421da510c8f0fd79b9dfe3e7f91c5..12d599c3424a595c0880d68e5ae7a6ced1e4e411 100644
--- a/src/sbbs3/putmsg.cpp
+++ b/src/sbbs3/putmsg.cpp
@@ -125,6 +125,13 @@ char sbbs_t::putmsgfrag(const char* buf, int& mode, unsigned org_cols, JSObject*
 				l += 9; // Skip "<NUL>WRAPOFF@"
 		}
 	}
+	if (mode & P_CENTER) {
+		size_t widest = widest_line(str + l);
+		if (widest < term->cols && term->column == 0) {
+			term->cursor_right((term->cols - widest) / 2);
+			mode |= P_INDENT;
+		}
+	}
 
 	while (l < len && (mode & P_NOABORT || !msgabort()) && online) {
 		switch (str[l]) {
diff --git a/src/sbbs3/sbbsdefs.h b/src/sbbs3/sbbsdefs.h
index 63488ce0b26557cdd5eacd3d18f6ddc406027f6d..92ff08c92d3852a6c9794c2f972b34ae78768f10 100644
--- a/src/sbbs3/sbbsdefs.h
+++ b/src/sbbs3/sbbsdefs.h
@@ -701,6 +701,7 @@ typedef enum {                       // Values for xtrn_t.event
 #define P_INDENT    (1 << 19)     // Indent lines to current cursor column
 #define P_ATCODES   (1 << 20)     // Trusted @-codes in formatted string
 #define P_MODS      (1 << 21)     // Display from mods/text dir, if file is there
+#define P_CENTER    (1 << 22)     // Center the output based on widest line
 
 #define P_XATTR_SHIFT 20
 #define P_WILDCAT   (SM_WILDCAT  << P_XATTR_SHIFT)