@paranoid database #74

Parent #309Owner #29Flags readSource hellcore/hellcore.db

Aliases: @paranoid database, paranoid

10 verbs · 12 properties · 0 children

Verbs

VerbSpecFlagsDefinerLines
ensure_props_existthis none thisrxd#7415
init_for_corethis none thisrxd#748
add_datathis none thisrxd#7415
get_datathis none thisrxd#7411
erase_datathis none thisrxd#748
set_kept_linesthis none thisrxd#749
gcthis none thisrxd#7425
help_msgthis none thisrxd#741
semiweeklyishthis none thisrxd#749
is_paranoidthis none thisrxd#742

Properties

PropertyDefinerFlagsOwnerValue
#361lines#74#290
#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#1rc#29{"@paranoid database", "paranoid"}
description#1rc#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#1r#29{583473, 1298433815}
hidden_verbs#1rc#29<clear>
phelp_msg#1rc#29<clear>
weight#1rc#29<clear>
owner_verbs#1rc#29<clear>
plural_name#1rc#29<clear>
client_image#1rc#29<clear>
listening#1rc#29<clear>

Ancestry

Ancestors (nearest first): #309 generic db object#1 root

Children: none

Call graph

calls n74_1 #74:init_for_core n48_8 #48:suspend_if_needed n74_1->n48_8 n74_2 #74:add_data n74_0 #74:ensure_props_exist n74_2->n74_0 n74_3 #74:get_data n42_0 #42:controls n74_3->n42_0 n74_4 #74:erase_data n74_4->n42_0 n74_5 #74:set_kept_lines n74_5->n74_0 n74_5->n42_0 n74_6 #74:gc n74_6->n48_8 n63_0 #63:raise n74_6->n63_0 n74_9 #74:is_paranoid n74_6->n74_9 n74_7 #74:help_msg n1_8 #1:description n74_7->n1_8 n74_8 #74:semiweeklyish n74_8->n74_6

Source

ensure_props_exist

Spec this none thisFlags rxdOwner #29Definer #74

Referenced by

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

Spec this none thisFlags rxdOwner #29Definer #74

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

Spec this none thisFlags rxdOwner #29Definer #74

Referenced by

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

Spec this none thisFlags rxdOwner #29Definer #74

Referenced by

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

Spec this none thisFlags rxdOwner #29Definer #74

Referenced by

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

Spec this none thisFlags rxdOwner #29Definer #74

Referenced by

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

Spec this none thisFlags rxdOwner #29Definer #74

Referenced by

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

Spec this none thisFlags rxdOwner #361Definer #74

Referenced by

none

Source

1return this:description();

semiweeklyish

Spec this none thisFlags rxdOwner #361Definer #74

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

Spec this none thisFlags rxdOwner #361Definer #74

Referenced by

Source

1"Some people make their .paranoid !r.  Wizardly verb to retrieve value.";
2return `args[1].paranoid ! ANY';