View/Edit #12:receive_message

Switch to edit mode.

Name(s): receive_message
1:  ":receive_message(msg,from)"
2:  if (!$perm_utils:controls(caller_perms(), this) && caller != this)
3:    return E_PERM
4:  endif
5:  if (this:mail_option("netmail"))
6:    msg = args[1]
7:    message = {msg[4] + " (fwd)", "Original-date: " + ctime(msg[1]), "Original-From: " + msg[2], "Original-To: " + msg[3], "Reply-To: " + args[2].name + "@" + $name + ".moo.mud.org"}
8:    "  for x in (msg[5..length(msg)])"
9:    "    message = {@message, @$editor:fill_string(x, this:linelength())};"
10:   "  endfor"
11:   message = {@message, @msg[5..length(msg)]}
12:   if (this:send_self_netmail(message, @listdelete(args, 1)) == 0)
13:     return 0
14:   endif
15: endif
16: "set_task_perms(this.owner);"
17: this:lock_mail_agent()
18: new = this:new_message_num()
19: "I'm not sure what the point of the below code was. - Lao"
20: "ncur = (new <= 1) ? 0 | min(this:current_message(this), new);"
21: "this:set_current_message(this, ncur);"
22: "new = max(new, ncur + 1);"
23: this:set_message(new, args[1])
24: this.locking_task = 0
25: "this:mail_notify(args[2], {this}, {new});"
26: return new
27: "Last modified by Cecil (#7407) on Sat Aug 24 10:19:13 2002 MDT."

Verb arguments: this none this
Verb perms: Readable eXecutable NOT-Debug
Verb owned by: Slacker (#55)

You are not logged in.

[home | help | who | search | setup | code]