Switch to edit mode.
Name(s): tell_www_body1: "Copied from Mail System (#47):tell_www_body by Raptor (#6319)Feb 12 19:34:51 2002"
2: {what} = {this, @args}
3: if (!player:isa($webber) || (what:isa($player) ? !$perm_utils:controls(player.user, what) | what.readers != 1 && !what:is_readable_by(player.user)))
4: return $msg:mtell("www_error", "Permission denied! You are not authorized to read this newsgroup.")
5: endif
6: if ((cookie = $www:parse_GET("mailcookie")) != E_PROPNF && cookie in {this:bake_mailcookie(what:basedir()), this:bake_mailcookie(what:basedir(), ctime(time() - 3600))})
7: "Performing a function with a good cookie (less than two hours old, to me, is when cookies are still fresh!)"
8: msgnum = toint((m = $www:parse_GET("msgnum")) == E_PROPNF ? 0 | m)
9: if (iobjstr)
10: if (player.user == $no_one)
11: return $msg:mtell("www_error", "You must be logged in to post messages.")
12: endif
13: this:do_www_post(what)
14: endif
15: if ($www:parse_GET("del"))
16: if (what:is_writable_by(player.user) && what:rm_message_seq({msgnum, msgnum + 1}))
17: player:tell("<h3>Deleted message ", tostr(msgnum), ".</h3>")
18: else
19: $msg:mtell("www_error", "Can't delete message " + tostr(msgnum) + ".")
20: endif
21: msgnum = msgnum - 1
22: elseif (pt = $www:parse_GET("post"))
23: if (player.user == $no_one)
24: $msg:mtell("www_error", "You must be logged in to post messages.")
25: else
26: return this:("www_" + pt)(what, msgnum)
27: endif
28: elseif (msgnum == E_PROPNF)
29: return $msg:mtell("www_error", "An error has occured! Please be sure to only use the Toolbar buttons!")
30: endif
31: this:www_read(what, msgnum)
32: return this:www_read_toolbar(what, msgnum)
33: else
34: this:www_list(what)
35: endif
36: "Last modified by Dax (#789) on Tue May 3 14:09:34 2005 MDT."