View/Edit #101:bf_notify

Switch to edit mode.

Name(s): bf_notify
1:  {who, what} = args
2:  caller_perms():controls(who) || raise(E_PERM)
3:  "(((ticks_left() < 2000) || (seconds_left() == 1)) && suspend(0)) && \"Like a suspend_if_needed call, but the ticks/seconds have to be less.\";"
4:  if (s = valid(who) ? `setremove(who.spied, who) ! E_PROPNF' | `$network:listener(who).spied ! E_PROPNF, E_INVIND, E_INVARG => {}')
5:    $spying_buffer = {@$spying_buffer, {who, what}}
6:    try
7:      fork (0)
8:        if (#104:has_property(tostr(who, "_spying_semaphore")))
9:          return
10:       endif
11:       add_property(#104, tostr(who, "_spying_semaphore"), 0, {$slacker, "c"})
12:       try
13:         for what in ($spying_buffer)
14:           if (what[1] == who)
15:             for x in (s)
16:               x:notify(tostr("[", who, "]: ", strsub(what[2], "~0D~0A", "")))
17:             endfor
18:             $spying_buffer = listdelete($spying_buffer, what in $spying_buffer)
19:           endif
20:           $cmd_utils:suspend_if_needed(0)
21:           " This suspend should be alright... any other... could be badish. :) "
22:         endfor
23:       finally
24:         delete_property(#104, tostr(who, "_spying_semaphore"))
25:       endtry
26:     endfork
27:   except (ANY)
28:   endtry
29: else
30:   for x in [1..5]
31:     "Tick"
32:   endfor
33: endif
34: "$login.total_data = $login.total_data + length(what);"
35: return pass(@args)
36: "Last modified by Cecil (#7407) on Tue Apr  1 09:36:05 2003 MST."

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]