View/Edit #12:page

Switch to edit mode.

Name(s): page
1:  "Send a private message to another player."
2:  nargs = length(args)
3:  if (nargs < 2)
4:    return player:tell("Usage:  page &lt;whom&gt; with &lt;message&gt;")
5:  endif
6:  text = ""
7:  if (index(tostr(@player.msg_page_origin), "%1") == 0)
8:    return player:tell("Your pages will not be delivered until your @page_origin contains %1.  Please type: @page_origin me is \"%N pages you: %1.\"")
9:  endif
10: if (nargs > 1)
11:   if (args[2] == "with" && nargs > 2)
12:     text = argstr[index(argstr, "with") + 5..$]
13:   else
14:     text = argstr[index(argstr, args[1]) + length(args[1]) + 1..$]
15:   endif
16:   text = player:autocorrect(text)
17: endif
18: "Tuvok (#7071) pointed out this nifty attack where you could boobytrap a room's :title verb in order to catch pages coming out of your room.  No more!"
19: "You could still carry out a traffic analysis, but this seems harder to block."
20: argstr = ""
21: "if ($su:is_numeric(args[1]) && (!valid($su:match_local_player(args[1]))))"
22: "  if ($cmd_utils:yes_or_no(tostr(\"User named '\", args[1], \"' could not be found. If this is an ICQ number, it can be paged from the MOO. Proceed assuming it is a valid ICQ number and that you wish to page it?\")))"
23: "    $icq:page(args[1], tostr(\"SNM: \", $su:nn(player)), player.email_address, \"SNM Page\", text);"
24: "    return player:tell(\"ICQ number paged.\");"
25: "  else"
26: "    return player:tell(\"ICQ number not paged.\");"
27: "  endif"
28: "endif"
29: if (args[1] == "help")
30:   if (player.helping)
31:     return player:tell("A helper shouldn't page help. Please reply to the user asking for help directly.")
32:   endif
33:   success = 0
34:   for x in (connected_players())
35:     `x.helping ! E_PROPNF' && (success = 1) && x:sub_tell(`x:msg_page_help() ! ANY => "[HELP]: %2: %1"', text, tostr(player:titlec(), `player.prog_help ! ANY' ? " (prog-helper)" | (`player.helping ! ANY' ? " (helper)" | "")))
36:     $command_utils:suspend_if_needed()
37:   endfor
38:   if (success)
39:     player.helping || player:tell("Your frantic plea for help has been sent.")
40:   elseif (length(connected_players()) > 1)
41:     player:tell("Unfortunately, no designated helpers are available right now, but one of the other players currently on-line may be able to assist you.")
42:   else
43:     player:tell("Unfortunately, there is nobody on-line besides you right now.  Try the help system (type 'help') or come back at a busier time.")
44:   endif
45:   return
46: endif
47: who = $string_utils:match_local_player(args[1])
48: if ($command_utils:player_match_result(who, args[1])[1])
49:   return
50: elseif (who in this.gaglist)
51:   $msg:mtell("page_gag", who)
52:   return
53: endif
54: "for pronoun_sub's benefit..."
55: dobj = who
56: iobj = player
57: result = who:receive_page(player:msg_page_origin(), text)
58: $msg:lmtell({who}, {who}, {player, result == 1 ? "msg_page_echo" | (result == 0 ? "msg_page_refused" | "msg_page_absent")}, "")
59: "Last modified by Dax (#789) on Fri Jun  3 16:25:38 2005 MDT."

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

You are not logged in.

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