@paranoid database #74
Aliases: @paranoid database, paranoid
10 verbs · 12 properties · 0 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
ensure_props_exist | this none this | rxd | #74 | 15 |
init_for_core | this none this | rxd | #74 | 8 |
add_data | this none this | rxd | #74 | 15 |
get_data | this none this | rxd | #74 | 11 |
erase_data | this none this | rxd | #74 | 8 |
set_kept_lines | this none this | rxd | #74 | 9 |
gc | this none this | rxd | #74 | 25 |
help_msg | this none this | rxd | #74 | 1 |
semiweeklyish | this none this | rxd | #74 | 9 |
is_paranoid | this none this | rxd | #74 | 2 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
#361lines | #74 | | #29 | 0 |
#361pdata | #74 | | #29 | list of 20{{{{#339, "look_self", #361, #3, #361, 65}, {#361, "l", #361, #107, #361, 28}, {#361, "<cmd-line>", #361}}, {""}}, {{{#339, "tell_map", #361, #3, #361, 88}, {#339, "look_self", #361, #3, #361, 70}, {#361, "l", #361, #107, #361, 28}, {#361, "<cmd-line>", #361}}, {"~1b[0m ~1b[33m~1b[1mStaff Lounge~1b[0m (~1b[36mhelle~1b[0m, ~1b[33madmin land~1b[0m)", "~1b[0m Just an empty conference room with a few folding chairs, a fake", "~1b[0m ~1b[36m~1b[1m~1b[44m()~1b[0m wood veneer table, and the persistent smell of cold coffee and", "~1b[0m ~1b[41m~1b[30mCR~1b[0m cigarette ash. Not a very inspiring place for the dark overlords", "~1b[0m of Hell. ", " "}}, {{{#339, "tell_contents", #361, #3, #361, 20}, {#339, "look_self", #361, #3, #361, 82}, {#361, "l", #361, #107, #361, 28}, {#361, "<cmd-line>", #361}}, {""}}, {{{#339, "look_self", #361, #3, #361, 87}, {#361, "l", #361, #107, #361, 28}, {#361, "<cmd-line>", #361}}, {"~1b[0m"}}, {{{#339, "list_exits", #361, #3, #361, 38}, {#339, "look_self", #361, #3, #361, 94}, {#361, "l", #361, #107, #361, 28}, {#361, "<cmd-line>", #361}}, {"~1b[36m[ Exits:~1b[0m~1b[0m ~1b[36m~1b[37m~1b[1msouth~1b[22m~1b[0m~1b[36m ]~1b[0m"}}, {{{#361, "net_receive", #361, #6, #362, 1}, {#365, "_announce_rendered", #361, #118, #362, 12}, {#365, "_announce", #361, #118, #362, 41}, {#103, "meat_reaper", #361, #103, #362, 1}, {#103, "_meat_reaper", #361, #103, #362, 10}, {#103, "_meat_reaper", #361, #103, #362, 7}, {#362, "<cmd-line>", #362}}, {"~1b[35m[tasknet]~1b[0m~1b[0m ~1b[36mmeat reaper starting -- last run 15 minutes ago~1b[0m"}}, {{{#361, "net_receive", #361, #6, #362, 1}, {#365, "_announce_rendered", #361, #118, #362, 12}, {#365, "_announce", #361, #118, #362, 41}, {#103, "meat_reaper", #361, #103, #362, 20}, {#103, "_meat_reaper", #361, #103, #362, 10}, {#103, "_meat_reaper", #361, #103, #362, 7}, {#362, "<cmd-line>", #362}}, {"~1b[35m[tasknet]~1b[0m~1b[0m ~1b[36mmeat reaper finished: run time was 0 seconds~1b[0m"}}, {{{#339, "do_sit", #361, #3, #361, 28}, {#182, "_finish", #361, #182, #361, 4}, {#361, "process_queue", #361, #92, #361, 91}, {#361, "fork_process_queue", #361, #92, #361, 10}, {#361, "<cmd-line>", #361}}, {"You sit on the floor."}}, {{{#361, "net_receive", #361, #6, #362, 1}, {#360, "_announce_rendered", #361, #118, #362, 12}, {#360, "_announce", #361, #118, #362, 41}, {#360, "announce", #361, #118, #362, 3}, {#150, "service_long_queue", #361, #150, #362, 15}, {#362, "<cmd-line>", #362}}, {"~1b[35m[prognet]~1b[0m~1b[0m ~1b[36m23:30 - helle (#207)~1b[0m"}}, {{{#361, "@set", #361, #2, #361, 48}, {#361, "<cmd-line>", #361}}, {"Property ", #66, ".", "boot_email_addresses", " set to ", "{\"jed@hellmoo.org\"}", "."}}, {{{#361, "net_receive", #361, #6, #362, 1}, {#330, "_announce_rendered", #361, #118, #362, 12}, {#330, "_announce", #361, #118, #362, 41}, {#330, "sys_announce", #361, #118, #362, 1}, {#150, "skip_beat", #361, #150, #362, 16}, {#150, "_beat", #361, #150, #362, 10}, {#150, "_beat", #361, #150, #362, 7}, {#362, "<cmd-line>", #362}}, {"~1b[31m{heartnet}~1b[0m~1b[0m ~1b[1mSkipping a beat. Of 1 active queues, 2 are still running. (100.0%)~1b[0m"}}, {{{#361, "net_receive", #361, #6, #362, 1}, {#360, "_announce_rendered", #361, #118, #362, 12}, {#360, "_announce", #361, #118, #362, 41}, {#360, "announce", #361, #118, #362, 3}, {#150, "service_long_queue", #361, #150, #362, 15}, {#362, "<cmd-line>", #362}}, {"~1b[35m[prognet]~1b[0m~1b[0m ~1b[36m23:35 - machine elves (#177)~1b[0m"}}, {{{#361, "net_receive", #361, #6, #362, 1}, {#360, "_announce_rendered", #361, #118, #362, 12}, {#360, "_announce", #361, #118, #362, 41}, {#360, "announce", #361, #118, #362, 3}, {#150, "service_long_queue", #361, #150, #362, 15}, {#362, "<cmd-line>", #362}}, {"~1b[35m[prognet]~1b[0m~1b[0m ~1b[36m23:40 - generic blueprint (#334)~1b[0m"}}, {{{#361, "net_receive", #361, #6, #362, 1}, {#365, "_announce_rendered", #361, #118, #362, 12}, {#365, "_announce", #361, #118, #362, 41}, {#103, "meat_reaper", #361, #103, #362, 1}, {#103, "_meat_reaper", #361, #103, #362, 10}, {#103, "_meat_reaper", #361, #103, #362, 7}, {#362, "<cmd-line>", #362}}, {"~1b[35m[tasknet]~1b[0m~1b[0m ~1b[36mmeat reaper starting -- last run 15 minutes ago~1b[0m"}}, {{{#361, "net_receive", #361, #6, #362, 1}, {#365, "_announce_rendered", #361, #118, #362, 12}, {#365, "_announce", #361, #118, #362, 41}, {#103, "meat_reaper", #361, #103, #362, 20}, {#103, "_meat_reaper", #361, #103, #362, 10}, {#103, "_meat_reaper", #361, #103, #362, 7}, {#362, "<cmd-line>", #362}}, {"~1b[35m[tasknet]~1b[0m~1b[0m ~1b[36mmeat reaper finished: run time was 0 seconds~1b[0m"}}, {{{#339, "look_self", #361, #3, #361, 65}, {#361, "l", #361, #107, #361, 28}, {#361, "<cmd-line>", #361}}, {""}}, {{{#339, "tell_map", #361, #3, #361, 88}, {#339, "look_self", #361, #3, #361, 70}, {#361, "l", #361, #107, #361, 28}, {#361, "<cmd-line>", #361}}, {"~1b[0m ~1b[33m~1b[1mStaff Lounge~1b[0m (~1b[36mhelle~1b[0m, ~1b[33madmin land~1b[0m)", "~1b[0m Just an empty conference room with a few folding chairs, a fake", "~1b[0m ~1b[36m~1b[1m~1b[44m()~1b[0m wood veneer table, and the persistent smell of cold coffee and", "~1b[0m ~1b[41m~1b[30mCR~1b[0m cigarette ash. Not a very inspiring place for the dark overlords", "~1b[0m of Hell. ", " "}}, {{{#339, "tell_contents", #361, #3, #361, 20}, {#339, "look_self", #361, #3, #361, 82}, {#361, "l", #361, #107, #361, 28}, {#361, "<cmd-line>", #361}}, {""}}, {{{#339, "look_self", #361, #3, #361, 87}, {#361, "l", #361, #107, #361, 28}, {#361, "<cmd-line>", #361}}, {"~1b[0m"}}, {{{#339, "list_exits", #361, #3, #361, 38}, {#339, "look_self", #361, #3, #361, 94}, {#361, "l", #361, #107, #361, 28}, {#361, "<cmd-line>", #361}}, {"~1b[36m[ Exits:~1b[0m~1b[0m ~1b[36m~1b[37m~1b[1msouth~1b[22m~1b[0m~1b[36m ]~1b[0m"}}} |
aliases | #1 | rc | #29 | {"@paranoid database", "paranoid"} |
description | #1 | rc | #29 | list of 19{"", "This object stores the @paranoid data from :tell. Normally it is not necessary to access these things directly. All verbs are controlled by a caller_perms() check. All data is stored in the old .responsible format.", "", ":add_data(who,data) adds one line's worth of data to the collection, trimming from the front as necessary.", "", ":get_data(who) retrieves the entire batch of data.", "", ":erase_data(who) sets the data to {}", "", ":set_kept_lines(who,number) Changes the number of kept lines. Maximum is 20.", "", "Core verbs that call the above are this are $player:tell, @check, @paranoid, and :erase_paranoid_data.", "", "Internal: ", " Properties used are", " tostr(player)+\"lines\"", " tostr(player)+\"pdata\"", " :ensure_props_exist(who,linesname,dataname): creates the above", " :GC() --- loops over all data and verifies they're for players."} |
object_size | #1 | r | #29 | {583473, 1298433815} |
hidden_verbs | #1 | rc | #29 | <clear> |
phelp_msg | #1 | rc | #29 | <clear> |
weight | #1 | rc | #29 | <clear> |
owner_verbs | #1 | rc | #29 | <clear> |
plural_name | #1 | rc | #29 | <clear> |
client_image | #1 | rc | #29 | <clear> |
listening | #1 | rc | #29 | <clear> |
Ancestry
Ancestors (nearest first): #309 generic db object → #1 root
Children: none
Call graph
Source
ensure_props_exist
Referenced by
- #74:add_data line 6:
this:ensure_props_exist - #74:set_kept_lines line 5:
this:ensure_props_exist
Source
1"*Must* be called with PDATA first, and LINES second."; 2if ((caller != this) && (!caller_perms().wizard)) 3return E_PERM; 4else 5try 6this.(args[2]); 7except (E_PROPNF) 8add_property(this, args[2], {}, {$hacker, ""}); 9endtry 10try 11this.(args[3]); 12except (E_PROPNF) 13add_property(this, args[3], 5, {$hacker, ""}); 14endtry 15endif
init_for_core
Referenced by
none
Source
1if (!caller_perms().wizard) 2return; 3else 4for x in (properties(this)) 5delete_property(this, x); 6$command_utils:suspend_if_needed(0); 7endfor 8endif
add_data
Referenced by
- #2:tell line 4:
$paranoid_db:add_data - #2:tell_lines line 11:
$paranoid_db:add_data
Source
1{who, newdata} = args; 2if (is_player(who) && caller_perms().wizard) 3"if ($perm_utils:controls(caller_perms(), who) && is_player(who))"; 4d = tostr(who, "pdata"); 5l = tostr(who, "lines"); 6this:ensure_props_exist(who, d, l); 7data = this.(d); 8lines = this.(l); 9"Icky G7 code copied straight out of $player:tell."; 10if (((len = length(this.(d) = {@data, newdata})) * 2) > (lines * 3)) 11this.(d) = this.(d)[(len - lines) + 1..len]; 12endif 13else 14return E_PERM; 15endif
get_data
Referenced by
- #2:@ch*eck-full line 1:
$paranoid_db:get_data
Source
1who = args[1]; 2if ($perm_utils:controls(caller_perms(), who)) 3d = tostr(who, "pdata"); 4if (typeof(`this.(d) ! ANY') == LIST) 5return this.(d); 6else 7return {}; 8endif 9else 10return E_PERM; 11endif
erase_data
Referenced by
- #2:erase_paranoid_data line 5:
$paranoid_db:erase_data
Source
1who = args[1]; 2if ($perm_utils:controls(caller_perms(), who)) 3d = tostr(who, "pdata"); 4"OK if this would toss its cookies if no prop, no damage."; 5`this.(d) = {} ! ANY'; 6else 7return E_PERM; 8endif
set_kept_lines
Referenced by
- #2:@paranoid line 3:
$paranoid_db:set_kept_lines - #2:@paranoid line 7:
$paranoid_db:set_kept_lines - #2:@paranoid line 12:
$paranoid_db:set_kept_lines - #2:@paranoid line 20:
$paranoid_db:set_kept_lines
Source
1maximum = 20; 2who = args[1]; 3if ($perm_utils:controls(caller_perms(), who) && is_player(who)) 4l = tostr(who, "lines"); 5this:ensure_props_exist(who, l, l); 6this.(l) = min(args[2], maximum); 7else 8return E_PERM; 9endif
gc
Referenced by
- #74:semiweeklyish line 8:
this:gc
Source
1if ((((caller != this) && (caller_perms() != #-1)) && (caller_perms() != player)) || (!player.wizard)) 2$error:raise(E_PERM); 3endif 4threshold = ((60 * 60) * 24) * 3; 5for x in (properties(this)) 6l = length(x); 7who = toobj(x[1..l - 5]); 8if (((!valid(who)) || (!is_player(who))) || (!this:is_paranoid(who))) 9delete_property(this, x); 10else 11if (index(x, "lines")) 12if (typeof(this.(x)) != INT) 13this.(x) = 10; 14endif 15elseif (index(x, "pdata")) 16if ((who.last_disconnect_time < (time() - threshold)) && (who.last_connect_time < (time() - threshold))) 17this.(x) = {}; 18endif 19if (typeof(this.(x)) != LIST) 20this.(x) = {}; 21endif 22endif 23endif 24$command_utils:suspend_if_needed(0); 25endfor
help_msg
Referenced by
none
Source
1return this:description();
semiweeklyish
Referenced by
none
Source
1if (!caller_perms().wizard) 2return E_PERM; 3else 4threedays = (3 * 24) * 3600; 5fork ((((7 * 60) * 60) + threedays) - (time() % threedays)) 6this:(verb)(); 7endfork 8this:gc(); 9endif
is_paranoid
Referenced by
- #74:gc line 8:
this:is_paranoid
Source
1"Some people make their .paranoid !r. Wizardly verb to retrieve value."; 2return `args[1].paranoid ! ANY';