552 @verb #119:"get_head" this none this rxdo #9682 @program #119:"get_head" this none this caller:isa(#120) || caller:isa(this) || raise(E_PERM) "Display the HEADer" "Used in conjunction with ARTICLE/HEAD" if (!valid(caller.group)) return player:tell("412 No group selected") endif {NUM, rnum, headers, ret} = {toint(args[1]), caller.group:get_num(toint(args[1])), caller.group:headers_in_seq(caller.group:get_num(toint(args[1]))), {}} "ret = {@ret, \"Path: moo.ca!moo.other.ca\"};" ret = {@ret, tostr("From: \"", sender = $su:explode(headers[2][2])[1], "\" ", sender, "@moo.ca")} news = "" to = headers[2][3] to = strsub(to, "and", "") to = $su:explode(to) for x in (to) if (x[1..1] == "*") ng = $mail_agent:match_recipient(x) if (valid(ng)) news = tostr(news, this:ngname(ng), " ") endif endif endfor ret = {@ret, tostr("Newsgroups: ", strsub($su:trimr(news), " ", " "))} ret = {@ret, tostr("Subject" + tostr(random(1000)) + ": ", strsub(headers[2][4], " ", "") ? headers[2][4] | "[no subject]")} ret = {@ret, tostr("Date: ", $time_utils:rfc1123_time(headers[2][1]))} ret = {@ret, tostr("Lines: 2")} "FIXME: shouldn't actually read the whole file." ret = {@ret, tostr("Message-ID: ", this:msgid(caller.group, NUM, headers[2][1]))} return ret "Last modified by Dax (#789) on Tue May 3 14:13:04 2005 MDT." . 0