Login Commands #4

Parent #1Owner #361Flags readSource hellcore/hellcore.db

Aliases: Login Commands

53 verbs · 61 properties · 0 children

Verbs

VerbSpecFlagsDefinerLines
?any none anyrxd#419
wel*come @wel*comeany none anyrxd#445
w*ho @w*hothis none thisrxd#420
co*nnect @co*nnectany none anyrxd#4130
cr*eate @cr*eateany none anyrxd#450
q*uit @q*uitany none anyrxd#46
up*time @up*timeany none anyrxd#46
v*ersion @v*ersionany none anyrxd#46
parse_commandthis none thisrxd#424
check_for_shutdownthis none thisrxd#418
check_player_dbthis none thisrxd#419
_match_playerthis none thisrxd#419
notifythis none thisrxd#42
tellthis none thisrxd#42
player_creation_enabledthis none thisrxd#47
newt_registration_string registration_string password_request_stringthis none thisrxd#41
init_for_corethis none thisrxd#435
special_actionthis none thisx#41
blacklisted graylisted redlisted spooflistedthis none thisrxd#431
blacklist_add*_temp graylist_add*_temp redlist_add*_temp spooflist_add*_tempthis none thisrxd#415
blacklist_remove*_temp graylist_remove*_temp redlist_remove*_temp spooflist_remove*_tempthis none thisrxd#421
listnamethis none thisrxd#41
who(vanilla)this none thisrxd#49
record_connectionthis none thisrxd#414
sample_lagthis none thisrxd#424
is_laggingthis none thisrxd#41
max_connectionsthis none thisrxd#49
request_characterthis none thisrxd#477
req*uest @req*uestany none anyrxd#417
h*elp @h*elpany none anyrxd#411
maybe_print_lagthis none thisrxd#413
current_lagthis none thisrxd#41
maybe_limit_commandsthis none thisrxd#430
server_startedthis none thisrxd#46
uptime_sincethis none thisrxd#412
count_bg_playersthis none thisrxd#412
blacklisted_temp graylisted_temp redlisted_temp spooflisted_tempthis none thisrxd#436
templist_expiredthis none thisrxd#412
temp_newt_registration_stringthis none thisrxd#41
add_interceptionthis none thisrxd#46
delete_interceptionthis none thisrxd#410
interceptionthis none thisrxd#43
intercepted_passwordthis none thisrxd#410
do_out_of_band_command doobcthis none thisrxd#42
check_for_checkpointthis none thisrxd#415
display_quotethis none thisrxd#417
name_okthis none thisrxd#45
MSSP-REQUESTany none anyrxd#431
pass*wordany none anyrxd#414
request_passwordthis none thisrxd#451
reset*passwordany none anyrxd#412
reset_passwordthis none thisrxd#447
is_admin_altthis none thisrxd#48

Properties

PropertyDefinerFlagsOwnerValue
welcome_message#4rc#361{"for more information and help: http://hellmoo.org", "", " h e l l c o r e", "-----------------", ""}
newt_registration_string#4rc#361"Your character is temporarily hosed."
registration_string#4rc#361"Character creation is disabled."
registration_address#4rc#361""
create_enabled#4rc#3611
bogus_command#4r#361"?"
blank_command#4r#361"welcome"
graylist#4#361{{}, {}}
blacklist#4#361{{}, {}}
redlist#4#361{{}, {}}
who_masks_wizards#4#3610
max_player_name#4rc#36140
spooflist#4#361{{}, {}}
ignored#4rc#361{}
max_connections#4rc#36199999
connection_limit_msg#4r#29"*** The MOO is too busy! The current lag is %l; there are %n connected. WAIT FIVE MINUTES BEFORE TRYING AGAIN."
lag_samples#4rc#361{0, 0, 0, 0, 0}
request_enabled#4rc#3611
help_message#4rc#361{"Sorry, but there's no help here yet. Type `?' for a list of commands."}
last_lag_sample#4rc#3610
lag_sample_interval#4rc#36115
boot_process#4rc#3610
lag_cutoff#4rc#3615
lag_exemptions#4rc#361{}
newted#4#361{}
current_connections#4rc#361{#-3}
current_numcommands#4rc#361{2}
max_numcommands#4rc#36120
temporary_newts#4c#361{}
downtimes#4rc#361
list of 11{{1337746278, 0}, {1337708625, 0}, {1337705525, 0}, {1337665571, 0}, {1337657146, 0}, {1337631510, 0}, {1335081052, 0}, {1335053805, 0}, {1335044966, 0}, {1328582204, 0}, {1312338735, 0}}
print_lag#4rc#3610
current_lag#4r#3610
temporary_blacklist#4#361{{}, {}}
temporary_redlist#4#361{{}, {}}
temporary_spooflist#4#361{{}, {}}
temporary_graylist#4#361{{}, {}}
intercepted_players#4#29{}
intercepted_actions#4#29{}
goaway_message#4rc#361
list of 24{" ***************************", " * Welcome to LagdaMOO! *", " ***************************", " ", " Running Version %v of LagdaMOO", "", "PLEASE NOTE:", " LagdaMOO is a new kind of society, where thousands of people voluntarily", "come together from all over the world. What these people say or do may not", "always be to your liking; as when visiting any international city, it is wise", "to be careful who you associate with and what you say.", " The operators of LagdaMOO have provided the materials for the buildings of", "this community, but are not responsible for what is said or done in them. In", "particular, you must assume responsibility if you permit minors or others to", "access LagdaMOO through your facilities. The statements and viewpoints", "expressed here are not necessarily those of the wizards, Pavel Curtis, ", "Stanford University, or Placeware Inc., and those parties disclaim any ", "responsibility for them.", "", "NOTICE FOR JOURNALISTS AND RESEARCHERS:", " The citizens of LagdaMOO request that you ask for permission from all", "direct participants before quoting any material collected here.", "", "For assistance either now or later, type `help'."}
checkpoint_in_progress#4rc#3610
quotes#4rc#361{{{"Come, let us make a Hell of our own, and try how long we can bear it."}, "Blackbeard"}}
highest_connected_players#4rc#3612
extra_mssp_vars#4rc#361
list of 17{4, {"PAY TO PLAY", 0}, 0, {"ANSI", 1}, {"FAMILY", "MOO"}, 0, 0, 0, 0, 0, 0, 0, {"PORT", 7777}, 0, 0, 0, 0}
evalled_mssp_vars#4rc#361
list of 17{1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {"CODEBASE", "\"LambdaMOO \" + server_version()"}}
hidden_commands#4rc#361{}
password_request_enabled#4rc#3611
password_request_string#4rc#361"Password change requests are currently disabled."
password_requests#4c#361
list of 129{94, {#618105, {"x80S2bEZBLrT2", 1276289932}, #662788, {"Yp4AJw4u0v2Uo", 1296887621}, #672714, {"/ZiYGp7vzg9YM", 1302047298}}, {#628968, {"nQGSYIUaF8uvE", 1284596924}, #674368, {"kppqrZGT8.ZZQ", 1302047074}}, 0, {#588922, {"IXU2TUJAkYRqw", 1275218369}, #616761, {"sfAfJNR9MQGKA", 1281205225}}, 0, 0, 0, {#631863, {"r4TpSSdKdqt6w", 1290827056}}, 0, {#628315, {"tH8oxuD4KWTxQ", 1283362106}}, 0, 0, 0, {#674786, {"MJ1OPHy.YttQc", 1307546083}}, {#619831, {"nk/dbc2dY3GBA", 1284746744}}, {#619601, {"vX9ezlg8SqizE", 1282698067}}, {#532549, {"uvTcCXe0qpX0.", 1293590984}}, {#618640, {"Td8trCHWnoddU", 1296383301}, #662832, {"ADcdw4jE40v8E", 1303581847}}, {#661236, {"6ERMEbxbJl1Wk", 1294620032}}, 0, {#663888, {"kO6CEMwGqGqSU", 1303526583}}, 0, {#608643, {"NILDSyLZm1Gu.", 1307124229}}, {#628884, {"0ADLFCX5F2aTg", 1285449597}, #631301, {"uBs7uYcBZPUWU", 1290093594}}, {#663958, {"1XXtrmzl5eHdo", 1301099925}}, 0, {#296059, {"UM13wIxzfbCe.", 1278356678}, #617016, {"L0xn.qib.ikag", 1302046655}}, {#275166, {"bPd6Z/UJ/kUWg", 1303656054}}, {#617280, {"VA.kMO7FjO7XU", 1283611015}}, {#663373, {"3zHVXgThJoy5s", 1298265871}, #674494, {"4EjKWi2lRLI06", 1302296754}}, 0, {#618376, {"zulT2aHAqisDk", 1302344144}}, 0, 0, 0, {#633444, {"bqs9kd4iE37gw", 1292550315}}, 0, 0, 0, 0, {#630311, {"TuysQggZtNDHs", 1297404159}}, {#674371, {"8Tu6NUrL4n31s", 1302046572}}, {#661046, {"XcLy1JtZbpDs.", 1293979920}, #331290, {"mBT2m2MnGZHCw", 1302053461}}, {#630001, {"blxPEnnPUtPP6", 1286921057}}, {#663405, {"M6euTQp85F6NI", 1298382472}}, 0, {#628800, {"HsX/Q4yUexOF.", 1284496683}}, {#325818, {"aHB4rSugeP5Ow", 1274152346}}, 0, 0, 0, 0, 0, 0, {#620161, {"IGmlPpFfAW7CI", 1293085242}, #674315, {"hRW8IOO05ofo.", 1302273441}}, 0, 0, 0, {#632090, {"L5ZysfXpL0vwo", 1291521536}}, 0, {#629034, {"wH1vGTuc/guKQ", 1301719534}}, 0, 0, 0, 0, {#2930, {"ClWy5lsjB7K2I", 1287965953}}, {#608676, {"/UzEuxqxIc272", 1303693481}}, 0, 0, 0, {#631244, {"2ZVCtKIr6qUOk", 1290750273}, #618032, {"92VWrPM7/1xb.", 1297200210}}, 0, 0, {#617724, {"0RThcphXDku.Y", 1274905998}}, {#610914, {"YBu4wrzVD5eAw", 1279963876}, #629099, {"s9vMu0nbFmcPQ", 1300754476}}, {#618517, {"DTesH1qjc74to", 1294358684}}, {#631981, {"fgLJ1fTiCToLY", 1291236751}, #664328, {"6RhhSQWI08E0w", 1301720078}}, {#631586, {"m2uJS56zmyxm.", 1290016224}, #660187, {"JxbL0KvWMLbUY", 1293641315}, #619318, {"g/ul11FXgT.eA", 1294926105}}, 0, 0, 0, {#390124, {"RLTLVJ8iu6rS.", 1274217124}}, 0, {#617737, {"DLe5Mkw3dwG8M", 1274857988}}, {#421229, {"rqEDSxbN.zoDU", 1275057693}, #662158, {"wudCwASmbdxUg", 1297300273}}, {#143778, {"zHYFCuNQTkee6", 1274145206}}, {#374210, {"J4YMrs85HFBGc", 1274849684}}, {#631057, {"8c.61RXTy6Mfg", 1289046051}, #629772, {"l0JtdQvTIfxNw", 1296247198}}, 0, 0, {#619107, {"c33zs3ZNlrpCc", 1282529587}}, {#617219, {"9x7YrJF9gxztQ", 1288104666}, #674354, {"maAB.Lc17FFn2", 1302051134}}, 0, {#519040, {"rGxaTraSlwBxo", 1276661019}}, {#617432, {"Jb10.uw61OEVc", 1274371257}}, {#618978, {"vTUtVptLdPCRw", 1279126354}}, {#661302, {"XSIUQnDatFREw", 1295038150}}, 0, 0, {#619686, {"IhUOW0D6QUCX6", 1287311319}}, {#631262, {"qvoP37PA8Y5HY", 1289090749}}, {#629220, {"hwnx0kuQIsZb.", 1287869227}, #662109, {"t35BdWlX62Csc", 1301742766}}, {#632082, {"SBB5mvQN8FFU.", 1292272531}, #664352, {"MkIeN.xz/Fdic", 1301304482}, #675211, {"sWsTG/cbv6/a6", 1310211293}}, 0, {#663630, {"I6oPCZzIYUXPQ", 1299445610}}, 0, 0, {#616875, {"xfFboZ2DELj3k", 1274135025}}, 0, {#663563, {"nGWFVF8dkzR.g", 1299210625}}, {#364619, {"hhibxyAEAKUO.", 1274334781}}, 0, 0, {#628559, {"J445mfMlFoyOQ", 1283640856}}, {#629804, {"8cYjFjozPY3KI", 1286459209}, #672641, {"ncA87tiIX8E2o", 1301735643}}, 0, {#518767, {"b67VT1WkfS1tk", 1281998031}, #661414, {"OKHMtVTGhrHgc", 1302351040}}, {#631536, {"JqO0d8j2QUUos", 1295403116}}, {#661111, {"qVRMV9rDS/Zfs", 1294201553}, #674691, {"0bZg6fNeZgvwc", 1306661012}}, 0, {#631608, {"YCIJx1agqiH4M", 1290094545}}, {#674335, {"zk8HCSk5r4LBA", 1302045714}}, {#608657, {"JoUzeFLue.P9w", 1276323554}}, 0, {#617497, {"HH8wosY8957yE", 1303762225}}, 0, {#674334, {"m.QFUy/LNZJMA", 1302046164}}, {#633517, {"dBwihf/fkT2qo", 1292866925}}}
no_mudconnect_msg#4rc#361"Welcome to HellMOO. Unfortunately, it looks like you're trying to use mudconnect.com to access our game. Please download the MUD client of your choice and try again from your own connection, or go to http://hellmoo.org/charon/ to use our Java client."
allowed_players#4rc#361
list of 81{#274333, #538501, #277040, #286782, #297773, #298305, #298900, #519113, #527355, #617775, #619345, #631348, #663888, #674317, #633570, #617826, #674579, #630369, #275166, #608532, #315537, #608676, #630189, #617497, #630274, #630188, #674394, #674580, #588945, #674581, #631755, #662832, #632123, #619563, #629251, #325930, #672650, #674583, #674327, #617016, #298599, #674584, #674585, #674586, #617534, #661222, #618517, #663003, #674324, #663365, #274742, #674439, #674574, #628945, #663942, #674588, #674592, #619487, #628302, #631609, #618343, #368903, #674454, #275209, #527279, #674420, #633412, #225238, #674594, #674595, #674596, #674597, #674598, #674599, #674600, #674601, #674602, #674603, #674604, #619622, #614354}
core_version#4rc#361"0.9.6"
aliases#1rc#361{"Login Commands"}
description#1rc#361"This provides everything needed by #0:do_login_command. See `help $login' on $core_help for details."
object_size#1r#29{81533, 1298433815}
hidden_verbs#1rc#361{"MSSP-REQUEST", "secret"}
phelp_msg#1rc#361<clear>
weight#1rc#361<clear>
owner_verbs#1rc#361<clear>
plural_name#1rc#361<clear>
client_image#1rc#361<clear>
listening#1rc#361<clear>

Ancestry

Ancestors (nearest first): #1 root

Children: none

Call graph

calls n4_0 #4:? n45_6 #45:ancestors n4_0->n45_6 n20_38 #20:explode n4_0->n20_38 n20_14 #20:uppercase n4_0->n20_14 n20_6 #20:english_list n4_0->n20_6 n4_1 #4:wel*come n4_45 #4:display_quote n4_1->n4_45 n35_6 #35:dhms n4_1->n35_6 n4_10 #4:check_player_db n4_1->n4_10 n4_9 #4:check_for_shutdown n4_1->n4_9 n4_44 #4:check_for_checkpoint n4_1->n4_44 n4_30 #4:maybe_print_lag n4_1->n4_30 n4_14 #4:player_creation_enabled n4_10->n4_14 n43_57 #43:fill_string n4_10->n43_57 n35_7 #35:english_time n4_9->n35_7 n4_9->n43_57 n4_31 #4:current_lag n4_30->n4_31 n4_2 #4:w*ho n17_12 #17:connected_wizards n4_2->n17_12 n4_12 #4:notify n4_2->n4_12 n51_42 #51:show_who_listing n4_2->n51_42 n48_1 #48:player_match_result n4_2->n48_1 n20_20 #20:match_player n4_2->n20_20 n19_1 #19:intersection n4_2->n19_1 n4_3 #4:co*nnect n4_11 #4:_match_player n4_3->n4_11 n45_5 #45:isa n4_3->n45_5 n20_53 #20:connection_hostname n4_3->n20_53 n4_39 #4:add_interception n4_3->n4_39 n47_17 #47:assoc n4_3->n47_17 n4_34 #4:uptime_since n4_3->n4_34 n38_2 #38:send_message n4_3->n38_2 n4_38 #4:temp_newt_registration_string n4_3->n4_38 n4_15 #4:newt_registration_string n4_3->n4_15 n4_26 #4:max_connections n4_3->n4_26 n45_16 #45:connected n4_3->n45_16 n4_3->n4_31 n45_0 #45:has_property n4_3->n45_0 n4_23 #4:record_connection n4_3->n4_23 n4_38->n35_7 n4_23->n20_53 n4_4 #4:cr*eate n4_4->n4_11 n4_4->n4_15 n4_4->n4_23 n4_4->n4_14 n4_46 #4:name_ok n4_4->n4_46 n32_3 #32:available n4_4->n32_3 n73_3 #73:bi_create n4_4->n73_3 n17_47 #17:grab_next_objnum n4_4->n17_47 n73_0 #73:initialize_quota n4_4->n73_0 n30_6 #30:insert n4_4->n30_6 n4_14->n20_53 n4_6 #4:up*time n4_6->n35_7 n4_8 #4:parse_command n4_8->n45_6 n4_41 #4:interception n4_8->n4_41 n20_24 #20:is_integer n4_8->n20_24

Showing 48 of 84 verbs; 36 not shown.

Source

?

Spec any none anyFlags rxdOwner #361Definer #4

Referenced by

none

Source

1if ((caller != #0) && (caller != this))
2return E_PERM;
3else
4clist = {};
5for j in ({this, @$object_utils:ancestors(this)})
6for i in [1..length(verbs(j))]
7if ((verb_args(j, i) == {"any", "none", "any"}) && index((info = verb_info(j, i))[2], "x"))
8vname = $string_utils:explode(info[3])[1];
9if (!(vname in this.hidden_verbs))
10star = index(vname + "*", "*");
11clist = {@clist, $string_utils:uppercase(vname[1..star - 1]) + strsub(vname[star..$], "*", "")};
12endif
13endif
14endfor
15endfor
16notify(player, "I don't understand that.  Valid commands at this point are");
17notify(player, "   " + $string_utils:english_list(setremove(clist, "?"), "", " or "));
18return 0;
19endif

wel*come @wel*come

Spec any none anyFlags rxdOwner #361Definer #4

Referenced by

none

Source

1if ((caller != #0) && (caller != this))
2return E_PERM;
3else
4msg = this.welcome_message;
5version = server_version();
6for line in ((typeof(msg) == LIST) ? msg | {msg})
7if (typeof(line) == STR)
8notify(player, strsub(line, "%v", version));
9endif
10endfor
11quote = this.quotes[random(length(this.quotes))];
12this:display_quote(@quote);
13uptime = "???";
14acount = icount = pcount = 0;
15uptime = $time_utils:dhms(time() - $last_restart_time);
16for x in (connected_players())
17if (is_a(x, $prog))
18acount = acount + 1;
19elseif (is_a(x, $immortal))
20icount = icount + 1;
21else
22pcount = pcount + 1;
23endif
24endfor
25notify(player, "");
26notify(player, "To request a character:");
27notify(player, ($ansi.bold_on + "  request <player_name> for <email_address>") + $ansi.reset);
28notify(player, "To connect with an existing player: ");
29notify(player, ($ansi.bold_on + "  connect <player> <password>") + $ansi.reset);
30notify(player, "If you forgot your password: ");
31notify(player, tostr(($ansi.bold_on + "  password <player> for <email_address>") + $ansi.reset));
32notify(player, "");
33if (icount)
34notify(player, tostr("(server v", version, " up ", uptime, ", ", pcount, " players, ", icount, " chillmins and ", acount, " admins connected)"));
35else
36notify(player, tostr("(server v", version, " up ", uptime, ", ", pcount, " players and ", acount, " admins connected)"));
37endif
38notify(player, tostr("core version: ", this.core_version));
39"notify(player, tostr(\"(server v\", version, \" up \", uptime, \", \", pcount + acount, \" connected)\"));";
40this:check_player_db();
41this:check_for_shutdown();
42this:check_for_checkpoint();
43this:maybe_print_lag();
44return 0;
45endif

w*ho @w*ho

Spec this none thisFlags rxdOwner #361Definer #4

Referenced by

none

Source

1masked = $login.who_masks_wizards ? $wiz_utils:connected_wizards() | {};
2if ((caller != #0) && (caller != this))
3return E_PERM;
4elseif (!args)
5plyrs = connected_players();
6if (length(plyrs) > 100)
7this:notify(tostr("You have requested a listing of ", length(plyrs), " players.  Please restrict the number of players in any single request to a smaller number.  The lag thanks you."));
8return 0;
9else
10$code_utils:show_who_listing($set_utils:difference(plyrs, masked)) || this:notify("No one logged in.");
11endif
12else
13plyrs = listdelete($command_utils:player_match_result($string_utils:match_player(args), args), 1);
14if (length(plyrs) > 100)
15this:notify(tostr("You have requested a listing of ", length(plyrs), " players.  Please restrict the number of players in any single request to a smaller number.  The lag thanks you."));
16return 0;
17endif
18$code_utils:show_who_listing(plyrs, $set_utils:intersection(plyrs, masked));
19endif
20return 0;

co*nnect @co*nnect

Spec any none anyFlags rxdOwner #361Definer #4

Referenced by

none

Source

1"$login:connect(player-name [, password])";
2" => 0 (for failed connections)";
3" => objnum (for successful connections)";
4((caller == #0) || (caller == this)) || raise(E_PERM);
5"=================================================================";
6"=== Check arguments, print usage notice if necessary";
7try
8{name, ?password = 0} = args;
9name = strsub(name, " ", "_");
10except (E_ARGS)
11notify(player, tostr("Usage:  ", verb, " <existing-player-name> <password>"));
12return 0;
13endtry
14try
15"=================================================================";
16"=== Is our candidate name invalid?";
17if (!valid(candidate = orig_candidate = this:_match_player(name)))
18raise(E_INVARG, tostr("`", name, "' matches no player name."));
19endif
20"=================================================================";
21"=== Is our candidate unable to connect for generic security";
22"=== reasons (ie clear password, non-player object)?";
23if (`is_clear_property(candidate, "password") ! E_PROPNF' || (!$object_utils:isa(candidate, $player)))
24server_log(tostr("FAILED CONNECT: ", name, " (", candidate, ") on ", connection_name(player), ($string_utils:connection_hostname(connection_name(player)) in candidate.all_connect_places) ? "" | "******"));
25raise(E_INVARG);
26endif
27"=================================================================";
28"=== Check password";
29if (typeof(cp = candidate.password) == STR)
30"=== Candidate requires a password";
31if (password)
32"=== Candidate requires a password, and one was provided";
33if (strcmp(crypt(password, cp), cp))
34"=== Candidate requires a password, and one was provided, which was wrong";
35server_log(tostr("FAILED CONNECT: ", name, " (", candidate, ") on ", connection_name(player), ($string_utils:connection_hostname(connection_name(player)) in candidate.all_connect_places) ? "" | "******"));
36raise(E_INVARG, "Invalid password.");
37else
38"=== Candidate requires a password, and one was provided, which was right";
39endif
40else
41"=== Candidate requires a password, and none was provided";
42set_connection_option(player, "binary", 1);
43notify(player, "Password: ");
44set_connection_option(player, "binary", 0);
45set_connection_option(player, "client-echo", 0);
46this:add_interception(player, "intercepted_password", candidate);
47return 0;
48endif
49elseif (cp == 0)
50"=== Candidate does not require a password";
51else
52"=== Candidate has a nonstandard password; something's wrong";
53raise(E_INVARG);
54endif
55"=================================================================";
56"=== Is the player locked out?";
57if ($no_connect_message && (!candidate.programmer))
58notify(player, $no_connect_message);
59server_log(tostr("REJECTED CONNECT: ", name, " (", candidate, ") on ", connection_name(player)));
60return 0;
61endif
62"=================================================================";
63"We're keeping non-admin alts off.";
64"if (((!this:is_admin_alt(candidate.email_address)) && (!(candidate in this.allowed_players))) && (candidate.donation < 1))";
65"  notify(player, \"Sorry, only players who have been invited or who have donated may connect. For a similar game that is open to all, please go to aftertheend.org 7777.\");";
66"  return 0;";
67"endif";
68"=================================================================";
69"=== Check guest connections";
70if ($object_utils:isa(candidate, $guest) && (!valid(candidate = candidate:defer())))
71if (candidate == #-2)
72server_log(tostr("GUEST DENIED: ", connection_name(player)));
73notify(player, "Sorry, guest characters are not allowed from your site at the current time.");
74else
75notify(player, "Sorry, all of our guest characters are in use right now.");
76endif
77return 0;
78endif
79"=================================================================";
80"=== Check newts";
81if (candidate in this.newted)
82if (entry = $list_utils:assoc(candidate, this.temporary_newts))
83if ((uptime = this:uptime_since(entry[2])) > entry[3])
84"Temporary newting period is over.  Remove entry.  Oh, send mail, too.";
85this.temporary_newts = setremove(this.temporary_newts, entry);
86this.newted = setremove(this.newted, candidate);
87fork (0)
88player = this.owner;
89$mail_agent:send_message(player, $newt_log, tostr("automatic @unnewt ", candidate.name, " (", candidate, ")"), {"message sent from $login:connect"});
90endfork
91else
92notify(player, "");
93notify(player, this:temp_newt_registration_string(entry[3] - uptime));
94boot_player(player);
95return 0;
96endif
97else
98notify(player, "");
99notify(player, this:newt_registration_string());
100boot_player(player);
101return 0;
102endif
103endif
104"=================================================================";
105"=== Connection limits based on lag";
106if ((((!candidate.wizard) && (!(candidate in this.lag_exemptions))) && ((howmany = length(connected_players())) >= (max = this:max_connections()))) && (!$object_utils:connected(candidate)))
107notify(player, $string_utils:subst(this.connection_limit_msg, {{"%n", tostr(howmany)}, {"%m", tostr(max)}, {"%l", tostr(this:current_lag())}, {"%t", candidate.last_connect_attempt ? ctime(candidate.last_connect_attempt) | "not recorded"}}));
108if ($object_utils:has_property($local, "mudlist"))
109notify(player, "You may wish to try another MUD while waiting for the MOO to unlag.  Here are a few that we know of:");
110for l in ($local.mudlist:choose(3))
111notify(player, l);
112endfor
113endif
114candidate.last_connect_attempt = time();
115server_log(tostr("CONNECTION LIMIT EXCEEDED: ", name, " (", candidate, ") on ", connection_name(player)));
116boot_player(player);
117return 0;
118endif
119"=================================================================";
120"=== Log the player on!";
121if (candidate != orig_candidate)
122notify(player, tostr("Okay,... ", name, " is in use.  Logging you in as `", candidate.name, "'"));
123endif
124this:record_connection(candidate);
125return candidate;
126except (E_INVARG)
127notify(player, "Either that player does not exist, or has a different password.");
128notify(player, tostr("Forgot your password? Email us at ", $login.registration_address, " and we can send you a new one."));
129return 0;
130endtry

cr*eate @cr*eate

Spec any none anyFlags rxdOwner #361Definer #4

Referenced by

none

Source

1if ((caller != #0) && (caller != this))
2return E_PERM;
3"... caller isn't :do_login_command()...";
4elseif (!this:player_creation_enabled(player))
5notify(player, this:registration_string());
6"... we've disabled player creation ...";
7elseif (length(args) != 2)
8notify(player, tostr("Usage:  ", verb, " <new-player-name> <new-password>"));
9elseif ($player_db.frozen)
10notify(player, "Sorry, can't create any new players right now.  Try again in a few minutes.");
11elseif ((!(name = args[1])) || (name == "<>"))
12notify(player, "You can't have a blank name!");
13if (name)
14notify(player, "Also, don't use angle brackets (<>).");
15endif
16elseif ((name[1] == "<") && (name[$] == ">"))
17notify(player, "Try that again but without the angle brackets, e.g.,");
18notify(player, tostr(" ", verb, " ", name[2..$ - 1], " ", strsub(strsub(args[2], "<", ""), ">", "")));
19notify(player, "This goes for other commands as well.");
20elseif (!this:name_ok(name))
21notify(player, "Sorry, that name won't work. Use a-z, 0-9, and underscores, and keep it under 20 characters.");
22elseif ((!$player_db:available(name)) || (this:_match_player(name) != $failed_match))
23notify(player, "Sorry, that name is not available.  Please choose another.");
24"... note the :_match_player call is not strictly necessary...";
25"... it is merely there to handle the case that $player_db gets corrupted.";
26elseif (!(password = args[2]))
27notify(player, "You must set a password for your player.");
28else
29new = $quota_utils:bi_create($player_class, $nothing);
30if (tonum(new) == 999999)
31`$wiz_utils:grab_next_objnum() ! ANY';
32endif
33set_player_flag(new, 1);
34new.name = name;
35new.aliases = {name};
36new.r = 1;
37new.programmer = $player_class.programmer;
38new.password = crypt(password);
39new.last_password_time = time();
40new.last_connect_time = $maxint;
41"Last disconnect time is creation time, until they login.";
42new.last_disconnect_time = time();
43"make sure the owership quota isn't clear!";
44$quota_utils:initialize_quota(new);
45this:record_connection(new);
46$player_db:insert(name, new);
47`move(new, $player_start) ! ANY';
48return new;
49endif
50return 0;

q*uit @q*uit

Spec any none anyFlags rxdOwner #361Definer #4

Referenced by

none

Source

1if ((caller != #0) && (caller != this))
2return E_PERM;
3else
4boot_player(player);
5return 0;
6endif

up*time @up*time

Spec any none anyFlags rxdOwner #361Definer #4

Referenced by

none

Source

1if ((caller != #0) && (caller != this))
2return E_PERM;
3else
4notify(player, tostr("The server has been up for ", $time_utils:english_time(time() - $last_restart_time), "."));
5return 0;
6endif

v*ersion @v*ersion

Spec any none anyFlags rxdOwner #361Definer #4

Referenced by

none

Source

1if ((caller != #0) && (caller != this))
2return E_PERM;
3else
4notify(player, tostr("The MOO is currently running version ", server_version(), " of the LambdaMOO server code."));
5return 0;
6endif

parse_command

Spec this none thisFlags rxdOwner #361Definer #4

Referenced by

Source

1":parse_command(@args) => {verb, args}";
2"Given the args from #0:do_login_command,";
3"  returns the actual $login verb to call and the args to use.";
4"Commands available to not-logged-in users should be located on this object and given the verb_args \"any none any\"";
5if ((caller != #0) && (caller != this))
6return E_PERM;
7endif
8if (li = this:interception(player))
9return {@li, @args};
10endif
11if (!args)
12return {this.blank_command, @args};
13elseif ((verb = args[1]) && (!$string_utils:is_numeric(verb)))
14for i in ({this, @$object_utils:ancestors(this)})
15try
16if ((verb_args(i, verb) == {"any", "none", "any"}) && index(verb_info(i, verb)[2], "x"))
17return args;
18endif
19except (ANY)
20continue i;
21endtry
22endfor
23endif
24return {this.bogus_command, @args};

check_for_shutdown

Spec this none thisFlags rxdOwner #361Definer #4

Referenced by

Source

1when = $shutdown_time - time();
2if (when >= 0)
3line = "***************************************************************************";
4notify(player, "");
5notify(player, "");
6notify(player, line);
7notify(player, line);
8notify(player, "****");
9notify(player, ("****  WARNING:  The server will shut down in " + $time_utils:english_time(when - (when % 60))) + ".");
10for piece in ($generic_editor:fill_string($shutdown_message, 60))
11notify(player, "****            " + piece);
12endfor
13notify(player, "****");
14notify(player, line);
15notify(player, line);
16notify(player, "");
17notify(player, "");
18endif

check_player_db

Spec this none thisFlags rxdOwner #361Definer #4

Referenced by

Source

1if ($player_db.frozen)
2line = "***************************************************************************";
3notify(player, "");
4notify(player, line);
5notify(player, "***");
6for piece in ($generic_editor:fill_string("The character-name matcher is currently being reloaded.  This means your character name might not be recognized even though it still exists.  Don't panic.  You can either wait for the reload to finish or you can connect using your object number if you remember it (e.g., `connect #1234 yourpassword').", 65))
7notify(player, "***       " + piece);
8endfor
9notify(player, "***");
10for piece in ($generic_editor:fill_string("Repeat:  Do not panic.  In particular, please do not send mail to any wizards or the registrar asking about this.  It will finish in time.  Thank you for your patience.", 65))
11notify(player, "***       " + piece);
12endfor
13if (this:player_creation_enabled(player))
14notify(player, "***       This also means that character creation is disabled.");
15endif
16notify(player, "***");
17notify(player, line);
18notify(player, "");
19endif

_match_player

Spec this none thisFlags rxdOwner #361Definer #4

Referenced by

Source

1":_match_player(name)";
2"This is the matching routine used by @connect.";
3"returns either a valid player corresponding to name or $failed_match.";
4name = args[1];
5if (valid(candidate = $string_utils:literal_object(name)) && is_player(candidate))
6return candidate;
7endif
8".....uncomment this to trust $player_db and have `connect' recognize aliases";
9if (valid(candidate = $player_db:find_exact(name)) && is_player(candidate))
10return candidate;
11endif
12".....uncomment this if $player_db gets hosed and you want by-name login";
13". for candidate in (players())";
14".   if (candidate.name == name)";
15".     return candidate; ";
16".   endif ";
17". endfor ";
18".....";
19return $failed_match;

notify

Spec this none thisFlags rxdOwner #361Definer #4

Referenced by

Source

1set_task_perms(caller_perms());
2`notify(player, args[1]) ! ANY';

tell

Spec this none thisFlags rxdOwner #29Definer #4

Referenced by

none

Source

1"keeps bad things from happening if someone brings this object into a room and talks to it.";
2return 0;

player_creation_enabled

Spec this none thisFlags rxdOwner #361Definer #4

Referenced by

Source

1"Accepts a player object.  If player creation is enabled for that player object, then return true.  Otherwise, return false.";
2"Default implementation checks the player's connecting host via $login:blacklisted to decide.";
3if (caller_perms().wizard)
4return this.create_enabled && (!this:blacklisted($string_utils:connection_hostname(connection_name(args[1]))));
5else
6return E_PERM;
7endif

newt_registration_string registration_string password_request_string

Spec this none thisFlags rxdOwner #361Definer #4

Referenced by

Source

1return $string_utils:subst(this.(verb), {{"%e", this.registration_address}, {"%%", "%"}});

init_for_core

Spec this none thisFlags rxdOwner #361Definer #4

Referenced by

none

Source

1if (caller_perms().wizard)
2pass();
3this.lag_exemptions = {};
4this.max_connections = 99999;
5this.lag_samples = {0, 0, 0, 0, 0};
6this.print_lag = 0;
7this.last_lag_sample = 0;
8this.bogus_command = "?";
9this.blank_command = "welcome";
10this.create_enabled = 1;
11this.registration_address = "";
12this.registration_string = "Character creation is disabled.";
13this.newt_registration_string = "Your character is temporarily hosed.";
14this.welcome_message = {"Welcome to the LambdaCore database.", "", "Type 'connect wizard' to log in.", "", "You will probably want to change this text and the output of the `help' command, which are stored in $login.welcome_message and $login.help_message, respectively."};
15this.help_message = {"Sorry, but there's no help here yet.  Type `?' for a list of commands."};
16this.redlist = this.blacklist = this.graylist = this.spooflist = {{}, {}};
17this.temporary_redlist = this.temporary_blacklist = this.temporary_graylist = this.temporary_spooflist = {{}, {}};
18this.who_masks_wizards = 0;
19this.newted = this.temporary_newts = {};
20this.downtimes = {};
21if ("monitor" in properties(this))
22delete_property(this, "monitor");
23endif
24if ("monitor" in verbs(this))
25delete_verb(this, "monitor");
26endif
27if ("record_connection(real)" in verbs(this))
28delete_verb(this, "record_connection");
29info = verb_info(this, "record_connection(real)");
30set_verb_info(this, "record_connection(real)", {info[1], "rxd", "record_connection"});
31endif
32if ("special_action" in verbs(this))
33set_verb_code(this, "special_action", {});
34endif
35endif

special_action

Spec this none thisFlags xOwner #361Definer #4

Referenced by

none

Source

1

blacklisted graylisted redlisted spooflisted

Spec this none thisFlags rxdOwner #361Definer #4

Referenced by

Source

1":blacklisted(hostname) => is hostname on the .blacklist";
2":graylisted(hostname)  => is hostname on the .graylist";
3":redlisted(hostname)   => is hostname on the .redlist";
4sitelist = this.(this:listname(verb));
5hostname = args[1];
6if (!caller_perms().wizard)
7return E_PERM;
8elseif ((hostname in sitelist[1]) || (hostname in sitelist[2]))
9return 1;
10elseif ($network:is_numeric_ip(hostname))
11for lit in (sitelist[1])
12if ((index(hostname, lit) == 1) && ((hostname + ".")[length(lit) + 1] == "."))
13return 1;
14endif
15endfor
16else
17for dom in (sitelist[2])
18if (index(dom, "*"))
19"...we have a wildcard; let :match_string deal with it...";
20if ($string_utils:match_string(hostname, dom))
21return 1;
22endif
23else
24"...tail of hostname ...";
25if ((r = rindex(hostname, dom)) && ((("." + hostname)[r] == ".") && (((r - 1) + length(dom)) == length(hostname))))
26return 1;
27endif
28endif
29endfor
30endif
31return this:(verb + "_temp")(hostname);

blacklist_add*_temp graylist_add*_temp redlist_add*_temp spooflist_add*_temp

Spec this none thisFlags rxdOwner #361Definer #4

Referenced by

none

Source

1"To add a temporary entry, only call the `temp' version.";
2"blacklist_add_temp(Site, start time, duration)";
3if (!caller_perms().wizard)
4return E_PERM;
5endif
6{where, ?start, ?duration} = args;
7lname = this:listname(verb);
8which = 1 + (!$network:is_numeric_ip(where));
9if (index(verb, "temp"))
10lname = "temporary_" + lname;
11this.(lname)[which] = setadd(this.(lname)[which], {where, start, duration});
12else
13this.(lname)[which] = setadd(this.(lname)[which], where);
14endif
15return 1;

blacklist_remove*_temp graylist_remove*_temp redlist_remove*_temp spooflist_remove*_temp

Spec this none thisFlags rxdOwner #361Definer #4

Referenced by

none

Source

1"The temp version removes from the temporary property if it exists.";
2if (!caller_perms().wizard)
3return E_PERM;
4endif
5where = args[1];
6lname = this:listname(verb);
7which = 1 + (!$network:is_numeric_ip(where));
8if (index(verb, "temp"))
9lname = "temporary_" + lname;
10if (entry = $list_utils:assoc(where, this.(lname)[which]))
11this.(lname)[which] = setremove(this.(lname)[which], entry);
12return 1;
13else
14return E_INVARG;
15endif
16elseif (where in this.(lname)[which])
17this.(lname)[which] = setremove(this.(lname)[which], where);
18return 1;
19else
20return E_INVARG;
21endif

listname

Spec this none thisFlags rxdOwner #361Definer #4

Referenced by

Source

1return {"???", "blacklist", "graylist", "redlist", "spooflist"}[1 + index("bgrs", (args[1] || "?")[1])];

who(vanilla)

Spec this none thisFlags rxdOwner #361Definer #4

Referenced by

none

Source

1if (caller != #0)
2return E_PERM;
3elseif (!args)
4$code_utils:show_who_listing(connected_players()) || this:notify("No one logged in.");
5else
6plyrs = listdelete($command_utils:player_match_result($string_utils:match_player(args), args), 1);
7$code_utils:show_who_listing(plyrs);
8endif
9return 0;

record_connection

Spec this none thisFlags rxdOwner #361Definer #4

Referenced by

Source

1":record_connection(plyr) update plyr's connection information";
2"to reflect impending login.";
3if (!caller_perms().wizard)
4return E_PERM;
5else
6plyr = args[1];
7plyr.first_connect_time = min(time(), plyr.first_connect_time);
8plyr.previous_connection = {plyr.last_connect_time, $string_utils:connection_hostname(plyr.last_connect_place)};
9plyr.last_connect_time = time();
10plyr.last_connect_place = cn = connection_name(player);
11chost = $string_utils:connection_hostname(cn);
12acp = setremove(plyr.all_connect_places, chost);
13plyr.all_connect_places = {chost, @acp[1..min($, 15)]};
14endif

sample_lag

Spec this none thisFlags rxdOwner #361Definer #4

Referenced by

Source

1if (!caller_perms().wizard)
2return E_PERM;
3endif
4lag = (time() - this.last_lag_sample) - 15;
5this.lag_samples = {lag, @this.lag_samples[1..3]};
6"Now compute the current lag and store it in a property, instead of computing it in :current_lag, which is called a hundred times a second.";
7thislag = max(0, (time() - this.last_lag_sample) - this.lag_sample_interval);
8if (thislag > (60 * 60))
9"more than an hour, probably the lag sampler stopped";
10this.current_lag = 0;
11else
12samples = this.lag_samples;
13sum = 0;
14cnt = 0;
15for x in (listdelete(samples, 1))
16sum = sum + x;
17cnt = cnt + 1;
18endfor
19this.current_lag = max(thislag, samples[1], samples[2], sum / cnt);
20endif
21fork (15)
22this:sample_lag();
23endfork
24this.last_lag_sample = time();

is_lagging

Spec this none thisFlags rxdOwner #361Definer #4

Referenced by

Source

1return this:current_lag() > this.lag_cutoff;

max_connections

Spec this none thisFlags rxdOwner #361Definer #4

Referenced by

Source

1max = this.max_connections;
2if (typeof(max) == LIST)
3if (this:is_lagging())
4max = max[1];
5else
6max = max[2];
7endif
8endif
9return max;

request_character

Spec this none thisFlags rxdOwner #361Definer #4

Referenced by

Source

1"request_character(player, name, address)";
2"return true if succeeded";
3if (!caller_perms().wizard)
4return E_PERM;
5endif
6{who, name, address} = args;
7connection = $string_utils:connection_hostname(connection_name(who));
8if (reason = $wiz_utils:check_player_request(name, address, connection))
9prefix = "";
10if (reason[1] == "-")
11reason = reason[2..$];
12prefix = "Please";
13else
14prefix = "Please try again, or, to register another way,";
15endif
16notify(who, reason);
17msg = tostr(prefix, " send mail to ", $login.registration_address, ", with the character name you want.");
18for l in ($generic_editor:fill_string(msg, 70))
19notify(who, l);
20endfor
21return 0;
22endif
23if (lines = $no_one:eval_d("$local.help.(\"multiple-characters\")")[2])
24notify(who, "Remember, in general, only one character per person is allowed.");
25notify(who, tostr("Do you already have a ", $network.moo_name, " character? [enter `yes' or `no']"));
26answer = read(who);
27if (answer == "yes")
28notify(who, "Process terminated *without* creating a character.");
29return 0;
30elseif (answer != "no")
31return notify(who, tostr("Please try again; when you get this question, answer `yes' or `no'. You answered `", answer, "'"));
32endif
33notify(who, "For future reference, do you want to see the full policy (from `help multiple-characters'?");
34notify(who, "[enter `yes' or `no']");
35if (read(who) == "yes")
36for x in (lines)
37for y in ($generic_editor:fill_string(x, 70))
38notify(who, y);
39endfor
40endfor
41endif
42endif
43notify(who, tostr("A character named `", name, "' will be created."));
44notify(who, tostr("A random password will be generated, and e-mailed along with"));
45notify(who, tostr(" an explanatory message to: ", address));
46notify(who, tostr(" [Please double-check your email address and answer `no' if it is incorrect.]"));
47notify(who, "Is this OK? [enter `yes' or `no']");
48try
49response = read(who);
50except e (E_INVARG)
51return 0;
52endtry
53if ((response != "yes") && (response != "y"))
54notify(who, "Process terminated *without* creating a character.");
55return 0;
56endif
57if (!$network.active)
58$mail_agent:send_message(this.owner, $registration_db.registrar, "Player request", {"Player request from " + connection, ":", "", (("@make-player " + name) + " ") + address});
59notify(who, tostr("Request for new character ", name, " email address '", address, "' accepted."));
60notify(who, tostr("Please be patient until the registrar gets around to it."));
61notify(who, tostr("If you don't get email within a week, please send regular"));
62notify(who, tostr("  email to: ", $login.registration_address, "."));
63elseif ($player_db.frozen)
64notify(who, "Sorry, can't create any new players right now.  Try again in a few minutes.");
65else
66new = $wiz_utils:make_player(name, address);
67password = new[2];
68new = new[1];
69notify(who, tostr("Character ", name, " (", new, ") created."));
70notify(who, tostr("Mailing password to ", address, "; you should get the mail within a few minutes."));
71notify(who, tostr("If you do not get it, please do NOT request another character."));
72notify(who, tostr("Instead, send regular email to ", $login.registration_address, ","));
73notify(who, tostr("with the name of the character you requested."));
74$mail_agent:send_message(this.owner, $new_player_log, tostr(name, " (", new, ")"), {address, tostr(" Automatically created at request of ", valid(player) ? player.name | "unconnected player", " from ", connection, ".")});
75$wiz_utils:send_new_player_mail(tostr("Someone connected from ", connection, " at ", ctime(), " requested a character on ", $network.moo_name, " for email address ", address, "."), name, address, new, password);
76return 1;
77endif

req*uest @req*uest

Spec any none anyFlags rxdOwner #361Definer #4

Referenced by

none

Source

1if ((caller != #0) && (caller != this))
2return E_PERM;
3endif
4"must be #0:do_login_command";
5if (!this.request_enabled)
6for line in ($generic_editor:fill_string(this:registration_string(), 70))
7notify(player, line);
8endfor
9elseif ((length(args) != 3) || (args[2] != "for"))
10notify(player, tostr("Usage:  ", verb, " <new-player-name> for <email-address>"));
11notify(player, "Your new player name must be one word. Do not include the angle brackets: <>.");
12elseif ($login:request_character(player, args[1], args[3]))
13"Set argstr below so that people can't harvest email addresses.";
14argstr = "";
15$furnace:new_player();
16boot_player(player);
17endif

h*elp @h*elp

Spec any none anyFlags rxdOwner #361Definer #4

Referenced by

none

Source

1if ((caller != #0) && (caller != this))
2return E_PERM;
3else
4msg = this.help_message;
5for line in ((typeof(msg) == LIST) ? msg | {msg})
6if (typeof(line) == STR)
7notify(player, line);
8endif
9endfor
10return 0;
11endif

maybe_print_lag

Spec this none thisFlags rxdOwner #361Definer #4

Referenced by

Source

1if ((caller == this) || (caller_perms() == player))
2if (this.print_lag)
3lag = this:current_lag();
4if (lag > 1)
5lagstr = tostr("approximately ", lag, " seconds");
6elseif (lag == 1)
7lagstr = "approximately 1 second";
8else
9lagstr = "low";
10endif
11notify(player, tostr("The lag is ", lagstr, "; there ", ((l = length(connected_players())) == 1) ? "is " | "are ", l, " connected."));
12endif
13endif

current_lag

Spec this none thisFlags rxdOwner #361Definer #4

Referenced by

Source

1return this.current_lag;

maybe_limit_commands

Spec this none thisFlags rxdOwner #361Definer #4

Referenced by

Source

1"This limits the number of commands that can be issued from the login prompt to prevent haywire login programs from lagging the MOO.";
2"$login.current_connections has the current player id's of people at the login prompt.";
3"$login.current_numcommands has the number of commands they have issued at the prompt so far.";
4"$login.max_numcommands has the maximum number of commands they may try before being booted.";
5if (!caller_perms().wizard)
6return E_PERM;
7else
8if (iconn = player in this.current_connections)
9knocks = this.current_numcommands[iconn] = this.current_numcommands[iconn] + 1;
10else
11this.current_connections = {@this.current_connections, player};
12this.current_numcommands = {@this.current_numcommands, 1};
13knocks = 1;
14"...sweep idle connections...";
15for p in (this.current_connections)
16if (typeof(`idle_seconds(p) ! ANY') == ERR)
17n = p in this.current_connections;
18this.current_connections = listdelete(this.current_connections, n);
19this.current_numcommands = listdelete(this.current_numcommands, n);
20endif
21endfor
22endif
23if (knocks > this.max_numcommands)
24notify(player, "Sorry, too many commands issued without connecting.");
25boot_player(player);
26return 1;
27else
28return 0;
29endif
30endif

server_started

Spec this none thisFlags rxdOwner #361Definer #4

Referenced by

Source

1"Called by #0:server_started when the server restarts.";
2if (caller_perms().wizard)
3this.lag_samples = {0, 0, 0, 0, 0};
4this.downtimes = {{time(), this.last_lag_sample}, @this.downtimes[1..min($, 100)]};
5this.intercepted_players = this.intercepted_actions = {};
6endif

uptime_since

Spec this none thisFlags rxdOwner #361Definer #4

Referenced by

Source

1"uptime_since(time): How much time has LambdaMOO been up since `time'";
2since = args[1];
3up = time() - since;
4for x in (this.downtimes)
5if (x[1] < since)
6"downtime predates when we're asking about";
7return up;
8endif
9"since the server was down between x[2] and x[1], don't count it as uptime";
10up = up - (x[1] - max(x[2], since));
11endfor
12return up;

count_bg_players

Spec this none thisFlags rxdOwner #361Definer #4

Referenced by

none

Source

1caller_perms().wizard || $error:raise(E_PERM);
2now = time();
3tasks = queued_tasks();
4sum = 0;
5for t in (tasks)
6delay = t[2] - now;
7interval = (delay <= 0) ? 1 | (delay * 2);
8"SUM is measured in hundredths of a player for the moment...";
9(delay <= 300) && (sum = sum + (2000 / interval));
10endfor
11count = sum / 100;
12return count;

blacklisted_temp graylisted_temp redlisted_temp spooflisted_temp

Spec this none thisFlags rxdOwner #361Definer #4

Referenced by

none

Source

1":blacklisted_temp(hostname) => is hostname on the .blacklist...";
2":graylisted_temp(hostname)  => is hostname on the .graylist...";
3":redlisted_temp(hostname)   => is hostname on the .redlist...";
4":spooflisted_temp(hostname) => is hostname on the .spooflist...";
5"";
6"... and the time limit hasn't run out.";
7lname = this:listname(verb);
8sitelist = this.("temporary_" + lname);
9if (!caller_perms().wizard)
10return E_PERM;
11elseif (entry = $list_utils:assoc(hostname = args[1], sitelist[1]))
12return this:templist_expired(lname, @entry);
13elseif (entry = $list_utils:assoc(hostname, sitelist[2]))
14return this:templist_expired(lname, @entry);
15elseif ($network:is_numeric_ip(hostname))
16for lit in (sitelist[1])
17if ((index(hostname, lit[1]) == 1) && ((hostname + ".")[length(lit[1]) + 1] == "."))
18return this:templist_expired(lname, @lit);
19endif
20endfor
21else
22for dom in (sitelist[2])
23if (index(dom[1], "*"))
24"...we have a wildcard; let :match_string deal with it...";
25if ($string_utils:match_string(hostname, dom[1]))
26return this:templist_expired(lname, @dom);
27endif
28else
29"...tail of hostname ...";
30if ((r = rindex(hostname, dom[1])) && ((("." + hostname)[r] == ".") && (((r - 1) + length(dom[1])) == length(hostname))))
31return this:templist_expired(lname, @dom);
32endif
33endif
34endfor
35endif
36return 0;

templist_expired

Spec this none thisFlags rxdOwner #361Definer #4

Referenced by

Source

1"check to see if duration has expired on temporary_<colorlist>. Removes entry if so, returns true if still <colorlisted>";
2":(listname, hostname, start time, duration)";
3{lname, hname, start, duration} = args;
4if (!caller_perms().wizard)
5return E_PERM;
6endif
7if (this:uptime_since(start) > duration)
8this:(lname + "_remove_temp")(hname);
9return 0;
10else
11return 1;
12endif

temp_newt_registration_string

Spec this none thisFlags rxdOwner #361Definer #4

Referenced by

Source

1return ("Your character is unavailable for another " + $time_utils:english_time(args[1])) + ".";

add_interception

Spec this none thisFlags rxdOwner #29Definer #4

Referenced by

Source

1(caller == this) || raise(E_PERM);
2{who, verbname, @arguments} = args;
3(who in this.intercepted_players) && raise(E_INVARG, "Player already has an interception set.");
4this.intercepted_players = {@this.intercepted_players, who};
5this.intercepted_actions = {@this.intercepted_actions, {verbname, @arguments}};
6return 1;

delete_interception

Spec this none thisFlags rxdOwner #29Definer #4

Referenced by

Source

1(caller == this) || raise(E_PERM);
2{who} = args;
3if (loc = who in this.intercepted_players)
4this.intercepted_players = listdelete(this.intercepted_players, loc);
5this.intercepted_actions = listdelete(this.intercepted_actions, loc);
6return 1;
7else
8"raise an error?  nah.";
9return 0;
10endif

interception

Spec this none thisFlags rxdOwner #29Definer #4

Referenced by

Source

1(caller == this) || raise(E_PERM);
2{who} = args;
3return (loc = who in this.intercepted_players) ? this.intercepted_actions[loc] | 0;

intercepted_password

Spec this none thisFlags rxdOwner #361Definer #4

Referenced by

none

Source

1(caller == #0) || raise(E_PERM);
2this:delete_interception(player);
3set_connection_option(player, "client-echo", 1);
4notify(player, "");
5try
6{candidate, ?password = ""} = args;
7except (E_ARGS)
8return 0;
9endtry
10return this:connect(tostr(candidate), password);

do_out_of_band_command doobc

Spec this none thisFlags rxdOwner #29Definer #4

Referenced by

none

Source

1"This is where oob handlers need to be put to handle oob commands issued prior to assigning a connection to a player object.  Right now it simply returns.";
2return;

check_for_checkpoint

Spec this none thisFlags rxdOwner #361Definer #4

Referenced by

Source

1if (this.checkpoint_in_progress)
2line = "***************************************************************************";
3notify(player, "");
4notify(player, "");
5notify(player, line);
6notify(player, line);
7notify(player, "****");
8notify(player, "****  NOTICE:  The server is very slow now.");
9notify(player, "****           The database is being saved to disk.");
10notify(player, "****");
11notify(player, line);
12notify(player, line);
13notify(player, "");
14notify(player, "");
15endif

display_quote

Spec this none thisFlags rxdOwner #361Definer #4

Referenced by

Source

1lines = args[1];
2source = args[2];
3tab = "  ";
4for x in (lines)
5if (length(lines) == 1)
6notify(player, ((tab[1..$ - 1] + "\"") + x) + "\"");
7elseif (x == lines[1])
8notify(player, (tab[1..$ - 1] + "\"") + x);
9elseif (x == lines[$])
10notify(player, (tab + x) + "\"");
11else
12notify(player, tab + x);
13endif
14tab = tab + " ";
15endfor
16notify(player, "");
17notify(player, (tab + "      -- ") + source);

name_ok

Spec this none thisFlags rxdOwner #361Definer #4

Referenced by

Source

1name = args[1];
2if (match(name, "[^a-zA-Z0-9_%-%.]") || (length(name) > 20))
3return 0;
4endif
5return 1;

MSSP-REQUEST

Spec any none anyFlags rxdOwner #361Definer #4

Referenced by

none

Source

1this:notify("MSSP-REPLY-START");
2vars = [];
3vars["NAME"] = $network.MOO_name;
4vars["PLAYERS"] = length(connected_players());
5vars["UPTIME"] = $last_restart_time;
6for kv in (vars)
7{k, v} = kv;
8this:notify((k + $ansi.tab) + tostr(v));
9endfor
10for kv in (this.extra_mssp_vars)
11{k, v} = kv;
12if (typeof(v) == LIST)
13v = $su:from_list(v, $ansi.tab);
14endif
15this:notify((k + $ansi.tab) + tostr(v));
16yield;
17endfor
18for kv in (this.evalled_mssp_vars)
19{k, v} = kv;
20try
21result = eval(("return " + v) + ";");
22if (result[1])
23this:notify((k + $ansi.tab) + tostr(result[2]));
24endif
25except e (ANY)
26$rpg:report_error(e, "MSSP");
27endtry
28yield;
29endfor
30this:notify("MSSP-REPLY-END");
31`$nets.sysnet:announce(this, tostr("MSSP request from ", connection_name(player)), 1) ! ANY';

pass*word

Spec any none anyFlags rxdOwner #361Definer #4

Referenced by

none

Source

1"Copied from Login Commands (#10):request by Satan (#2) Mon May  3 12:50:36 2010 CDT";
2if ((caller != #0) && (caller != this))
3return E_PERM;
4endif
5"must be #0:do_login_command";
6if (!this.password_request_enabled)
7notify(player, this.password_request_string);
8elseif ((length(args) != 3) || (args[2] != "for"))
9notify(player, tostr("Usage:  ", verb, " <player-name> for <email-address>"));
10notify(player, "The email address must be the one your character is currently registered to. Do not include the angle brackets: <>.");
11notify(player, "If you do not know your character name or registered email address, please send us an email at " + $network.password_postmaster);
12elseif ($login:request_password(player, args[1], args[3]))
13boot_player(player);
14endif

request_password

Spec this none thisFlags rxdOwner #361Definer #4

Referenced by

Source

1"request_password(player, name, address)";
2"return true if succeeded";
3if (!caller_perms().wizard)
4return E_PERM;
5endif
6{who, name, address} = args;
7playerobj = $login:_match_player(name);
8connection = $string_utils:connection_hostname(connection_name(who));
9"Check that the name is valid, that the address is registered to the name, and that there isn't already an active request.";
10"Also make sure .password is not set to 'scrambled'";
11if (playerobj == $failed_match)
12notify(who, tostr("There is no player with that name."));
13return 0;
14elseif (playerobj.email_address != address)
15notify(who, tostr("The player \"", name, "\" is not registered to the email address \"", address, "\"."));
16return 0;
17"elseif (((!this:is_admin_alt(address)) && (!(playerobj in this.allowed_players))) && (playerobj.donation < 1))";
18"  notify(player, \"Sorry, only players who have been invited or who have donated may connect. For a similar game that is open to all, please go to aftertheend.org 7777.\");";
19"  return 0;";
20elseif (playerobj.password == "scrambled")
21notify(who, tostr("The password for \"", name, "\" is scrambled."));
22return 0;
23elseif (playerobj in keys(this.password_requests))
24req = this.password_requests[playerobj];
25if ((time() - req[2]) < 86400)
26notify(who, tostr("You already have requested a password reset in the last 24 hours."));
27return 0;
28endif
29endif
30notify(who, tostr("A new password for `", name, "' will be requested."));
31notify(who, tostr("A response with further instructions for resetting your password will be sent to: ", address));
32notify(who, tostr(" [Please double-check your email address and answer `no' if it is incorrect.]"));
33notify(who, "Is this OK? [enter `yes' or `no']");
34response = read(who);
35if ((response != "yes") && (response != "y"))
36notify(who, "Process terminated *without* requesting a password.");
37return 0;
38endif
39if ((!$network.active) || $player_db.frozen)
40notify(who, tostr("Automatic password requests are disabled. Please send your request by"));
41notify(who, tostr("  email to: ", $login.registration_address, "."));
42else
43reqhash = crypt(tostr(random($maxint)));
44this.password_requests[playerobj] = {reqhash, time()};
45notify(who, tostr("Mailing password reset instructions for ", name, " to ", address, "; you should get the mail within a few minutes."));
46notify(who, tostr("If you do not get it, please send email to ", $login.registration_address, ","));
47notify(who, tostr("with the name of the character you need a new password for, and we can reset it for you."));
48$mail_agent:send_message(this.owner, $new_password_log, tostr(name, " (", who, ")"), {address, tostr(" Password reset requested by ", valid(player) ? player.name | "unconnected player", " from ", connection, ".")});
49$wiz_utils:send_new_password_mail(tostr("Someone connected from ", connection, " at ", ctime(), " requested a password on ", $network.moo_name, " for email address ", address, "."), name, address, reqhash);
50return 1;
51endif

reset*password

Spec any none anyFlags rxdOwner #361Definer #4

Referenced by

none

Source

1if ((caller != #0) && (caller != this))
2return E_PERM;
3endif
4"must be #0:do_login_command";
5if (!this.password_request_enabled)
6notify(player, this.password_request_string);
7elseif (length(args) != 2)
8notify(player, tostr("Usage:  ", verb, " <player-name> <request-code>"));
9notify(player, "The request code must be the one sent to you by email after you used the 'request' command.");
10elseif ($login:reset_password(player, args[1], args[2]))
11boot_player(player);
12endif

reset_password

Spec this none thisFlags rxdOwner #361Definer #4

Referenced by

Source

1"request_password(player, name, reqhash)";
2"return true if succeeded";
3if (!caller_perms().wizard)
4return E_PERM;
5endif
6{who, name, reqhash} = args;
7playerobj = $login:_match_player(name);
8if (playerobj == $failed_match)
9notify(who, tostr("There is no player with that name."));
10return 0;
11endif
12connection = $string_utils:connection_hostname(connection_name(who));
13address = playerobj.email_address;
14if ((playerobj.password == "scrambled") || (playerobj.password == ""))
15notify(who, tostr("The password for \"", name, "\" is scrambled."));
16return 0;
17elseif (playerobj in keys(this.password_requests))
18req = this.password_requests[playerobj];
19if ((time() - req[2]) > 86400)
20notify(who, tostr("You have not requested a password reset in the last 24 hours."));
21return 0;
22elseif (req[1] != reqhash)
23notify(who, "Incorrect code. Please re-check the email you received.");
24return 0;
25endif
26else
27notify(who, tostr("You have not requested a password reset in the last 24 hours."));
28return 0;
29endif
30notify(who, tostr("A new password for `", name, "' will be generated and sent to: ", address));
31notify(who, tostr(" [Please double-check your email address and answer `no' if it is incorrect.]"));
32notify(who, "Is this OK? [enter `yes' or `no']");
33response = read(who);
34if ((response != "yes") && (response != "y"))
35notify(who, "Process terminated *without* resetting a password.");
36return 0;
37endif
38if ((!$network.active) || $player_db.frozen)
39notify(who, tostr("Automatic password requests are disabled. Please send your request by"));
40notify(who, tostr("  email to: ", $login.registration_address, "."));
41else
42notify(who, tostr("Mailing new password for ", name, " to ", address, "; you should get the mail within a few minutes."));
43notify(who, tostr("If you do not get it, please send email to ", $login.registration_address, ","));
44notify(who, tostr("with the name of the character you need a new password for, and we can reset it for you."));
45$wiz_utils:reset_password(playerobj);
46return 1;
47endif

is_admin_alt

Spec this none thisFlags rxdOwner #361Definer #4

Referenced by

none

Source

1email = args[1];
2for x in ($ou:leaves_suspended($immortal))
3if (x.email_address == email)
4return 1;
5endif
6yield;
7endfor
8return 0;