Skip to content

Instantly share code, notes, and snippets.

@dougo
Created May 3, 2014 17:39
Show Gist options
  • Save dougo/b7c46082dd84e7161bfa to your computer and use it in GitHub Desktop.
Save dougo/b7c46082dd84e7161bfa to your computer and use it in GitHub Desktop.
Ten longest non-comment lines of code in JHCore.
irb(main):012:0> puts IO.readlines("/Users/dorleans/Downloads/JHCore-DEV-2.db").select { |l| l.end_with?(";\n") }.reject { |l| l.start_with?('"') }.sort_by(&:length).last(10)
player:notify(tostr(su:left(tostr(j, " ", unit, (j == 1) ? ":" | "s:"), col1), su:right(pcounts[i], col2), su:right(totalp = totalp + pcounts[i], col3), su:right((totalp * 100) / nump, col4), "%", with_objects ? tostr(su:right(ocounts[i], col5), su:right(totalo = totalo + ocounts[i], col6), su:right((totalo * 100) / numo, col7), "%") | ""));
return {@pass(@args), $string_utils, $login, $object_utils, $guest, this.known_player, $nobody, $list_utils, $guest_log, $player_db, $code_utils, $registration_db, $network, $player_class, $wiz_utils, $player_start, $generic_editor, $mail_agent, $new_player_log, $new_player_log.autoregistration_player, $exit, $error, $you, $command_utils, $boot_log, $toad_log};
return {@pass(@args), $object_utils, $jtext, $jtext.paragraph, $list_utils, $command_utils, $string_utils, $code_utils, $no_one, $jtext.title, $jtext.header, $jtext.index, $jtext.plaintext, $perm_utils, $note_editor, $jtext.vgroup, $jaddress, $jaddress.help, $jtext.hr, $jtext.itemize_unnumbered, $jtext.hgroup, $jtext.dlist, $jtext.link, $jtext.link.root, $generic_help, $help_editor};
$network:sendmail(dobj.email_address, "@new-password " + $string_utils:nn(dobj), @{"Cc: " + $login.registration_address, "Reply-To: " + $login.registration_address, ((((((((("The character \"" + dobj:name()) + "\" registered to this email address on ") + $network.MOO_name) + " (") + $network.site) + " ") + tostr($network.port)) + ") has a new password. Your new password is \"") + iobjstr) + "\"."});
this:notify(tostr("Sorry, but you've been here for ", $string_utils:from_seconds(connected_seconds(this)), " and someone else wants to be a guest now. Feel free to come back", @$login:player_creation_enabled(player) ? {" or even create your own character if you want..."} | ($login.registration_address ? {" or send mail to ", $login.registration_address, " to obtain a character of your own."} | {"."})));
return {@d, "", "---- Do `help <cmdname>' for help with a given command. ----", "", " <ins> ::= $ (the end) | [^]n (above line n) | _n (below line n) | . (current)", "<range> ::= <lin> | <lin>-<lin> | from <lin> | to <lin> | from <lin> to <lin>", " <lin> ::= n | [n]$ (n from the end) | [n]_ (n before .) | [n]^ (n after .)", "`help insert' and `help ranges' describe these in detail.", @this.description};
target:receive_vbox({$jtext.vgroup, {$jtext.title, topic ? tostr("Help on ", topic) | "Help summary"}, {$jtext.header, 1, (topic || "summary") + " -- NOT FOUND"}, {$jtext.paragraph, tostr(help:dnamec(), " thinks it knows about `", topic, "' but something's messed up.")}, {$jtext.paragraph, tostr("Please tell ", (help.owner.wizard || (help.owner == $hacker)) ? "" | tostr(help.owner:dname(), " or "), "a documenter.")}});
result = $network:sendmail(email, tostr("Your ", $network.MOO_Name, " character, ", who.name), "Reply-to: " + $login.registration_address, @$generic_editor:fill_string(tostr("Your ", $network.MOO_name, " character, ", $string_utils:nn(who), " has been registered to this email address (", email, "), and a new password assigned. The new password is `", password, "'. Please keep your password secure. You can change your password with the @password command. ", $network.moo_name, " is at ", $network.site, " ", $network.port, "."), 75));
this.welcome_message = {"Welcome to the JHCore database.", (((" Extracted " + $time_utils:time_sub("$N $t, $Y")) + " (under LambdaMOO ") + server_version()) + ")", "", "Type 'connect wizard' to log in.", "", "You will probably want to change this text, which is stored in $login.welcome_message.", "", "Before you do, though, please read `help core-copyright' (linked to `help copyright') for the exceedingly broad copyright on JHCore.", "", "You will also want to read `help getting-started' for some more information about starting a JHCore MOO."};
return {@pass(@args), @$player.features, $player_start, $object_help, $feature_help, $news, $object_utils, $perm_utils, $string_utils, $pronoun_sub, $pronoun_sub.lambdacore, $player_db, $command_utils, $code_utils, $recycler, $last_huh, $feature, $room, $no_one, $login_watcher, $list_utils, $time_utils, $hacker, $you, $help, $wiz_utils, $jtext, $jtext.title, $jtext.vgroup, $jtext.header, $network, $generic_editor, $mail_agent, $mail_editor, $error, $mail_recipient, $seq_utils, $mail_options, $edit_options, $guest, $building_utils, $note_editor, $gender_utils, $lock_utils, $root_class, $builder, $prog, $feature.registry, $exit, $set_utils, $integration_utils, $who_options, $misc_options, $client_options, $verb_editor, $jaddress, $admin, $admin_group, this.pronoun_sub_style, $failed_help, $jaddress.resolved_help, $who_utils, $login, $new_player_log, $registration_db, $walking_utils, $room_matching_utils};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment