@verb #12:"display_message" this none this rxdo #55 @program #12:"display_message" this none this ":display_message(preamble, msg, postscript) --- prints msg to player. postscript is text to go after the message body." {preamble, message, ?postscript = {}} = args "Timezone hack. Originally done to the date field, expanded to the entire message after Quadir proposed the idea. Quite the messy little hack." newmessage = {} for x in (message) newline = "" while (match = match(x, $time_utils.ctime_regexp)) newline = tostr(newline, x[1..match[1] - 1]) newline = `tostr(newline, this:ctime(x[match[1]..match[2]])) ! ANY => tostr(newline, x[match[1]..match[2]])' x = x[match[2] + 1..$] endwhile newline = tostr(newline, x) newmessage = {@newmessage, newline} endfor try player:tell({@preamble, @newmessage, @postscript, "--------------------------"}) except e (ANY) try oro = player.output_rendering_object player.output_rendering_object = $stripped_renderer player:tell({"--- WARNING: This message contained broken HTML, which was removed ---", @preamble, @newmessage, @postscript, "--------------------------"}) player.output_rendering_object = oro except e2 (ANY) player.output_rendering_object = oro player:tell({tostr("An error was encountered while trying to display the message: ", e[1], " (", toliteral(e[1]), ")"), "", "This message cannot be displayed in-MOO, probably due to excessive or poorly written HTML markup. To avoid seeing this message, discourage the sender from sending HTML emails in the future. Plain text works great!", "", "In the meantime, if you really need to read the message, try @netforwarding it to your real email address and see if that helps."}) raise(e) endtry endtry "Last modified by Lao-Tzu (#8084) on Sun Nov 24 19:40:12 2002 MST." .