Mostly experimental additions to the LambdaMOO-Stunt server, embarrassing mistakes and all.
Branch: master
Clone or download
lisdude Add a third argument to move() that allows you to listinsert your obj…
…ect anywhere in the destination's contents.
Latest commit 6a482a3 Feb 20, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
crypt
dependencies
docs Pimp ToastCore. Feb 17, 2019
executables
files Ensure we have a files/ directory. Jul 22, 2012
test
yajl Move YAJL code into a subdirectory. Nov 26, 2016
.gitignore Don't ignore Test.db. Feb 10, 2019
.gitmodules Add dependencies directory and Argon2 Git submodule. Feb 10, 2019
.indent.pro
GNUmakefile
Gemfile
Gemfile.lock Pick up latest versions of Ruby and Parslet. Nov 6, 2016
Makefile.in Remove bundled Nettle in favor of the system version. Feb 10, 2019
Minimal.db
Test.db Add unit tests for waifs. Feb 13, 2019
acinclude.m4 Added autoconf support for detecting /dev/random. Nov 18, 2013
aclocal.m4 Added support for BCrypt encryption and salt generation. Nov 17, 2013
ast.cc Remove old code dealing with floats being complex types. Feb 7, 2019
ast.h Remove old code dealing with floats being complex types. Feb 7, 2019
base64.cc BUG: fix memoized length of base64 encoded string. Nov 29, 2016
base64.h
bf_register.h
client_bsd.c Stripped RCS comments. Nov 28, 2013
client_sysv.c Stripped RCS comments. Nov 28, 2013
code_gen.cc
code_gen.h Stripped RCS comments. Nov 28, 2013
collection.cc
collection.h Map in/is_member now behaves more like list in/is_member. Jul 20, 2011
config.h.in
configure.ac Only use the flags we actually need for Nettle. Feb 10, 2019
crypto.cc
crypto.h Added support for BCrypt encryption and salt generation. Nov 17, 2013
db.h Add a third argument to move() that allows you to listinsert your obj… Feb 20, 2019
db_file.cc Correctly set up the last_move property on old Stunt databases. Feb 12, 2019
db_io.cc
db_io.h Add a configuration option to switch between 32 and 64 bit integers. Feb 7, 2019
db_objects.cc
db_private.h Replace last_location with last_move. Jun 1, 2018
db_properties.cc
db_tune.h Merge UNSAFE_OPTS (r5) after extensive testing. Jul 7, 1997
db_verbs.cc Use native strcasecmp and strncasecmp. Nov 15, 2018
decompile.cc
decompile.h Stripped RCS comments. Nov 28, 2013
disassemble.cc
disassemble.h
eval_env.cc Remove the deprecated 'register' keyword. Jun 19, 2018
eval_env.h
eval_vm.cc Stripped RCS comments. Nov 28, 2013
eval_vm.h Stripped RCS comments. Nov 28, 2013
exec.cc Add a third argument to exec that allows you to set environment varia… Jun 11, 2018
exec.h Moved the exec constants into options.h. Apr 26, 2013
execute.cc
execute.h
extension-argon2.cc Fixed free() crash in argon2() Feb 3, 2019
extension-background.cc
extension-background.h
extension-pcre.cc This pr contains logic and build improvements to enable Toaststunt to… Feb 2, 2019
extension-pcre.h Move header-like things into a header and do some minor cleanup. Jul 11, 2018
extension-simplexnoise.cc
extension-simplexnoise.h
extension-spellcheck.cc
extension-sqlite.cc
extension-sqlite.h Add locks to SQLite handles so that they can't be closed until all th… Dec 27, 2018
extensions.cc Allow non-wizards to use the chr() builtin. Feb 14, 2019
fileio.cc
fileio.h
functions.cc
functions.h
garbage.cc Refactor `is_object()'. Nov 27, 2016
garbage.h
http_parser.c Modify the HTTP error messages. Sep 3, 2011
http_parser.h The Node HTTP parsing library. Sep 3, 2011
install-sh Upgraded to Autoconf 2. Jun 17, 2013
json.cc Fix a panic when trying to use waifs or anonymous objects as map keys… Feb 10, 2019
json.h
keywords.gperf Stripped RCS comments. Nov 28, 2013
keywords.h Stripped RCS comments. Nov 28, 2013
linenoise.c Added linenoise. Feb 3, 2014
linenoise.h Added linenoise. Feb 3, 2014
list.cc Improve performance of unparsing floats. Feb 9, 2019
list.h Add a configuration option to switch between 32 and 64 bit integers. Feb 7, 2019
log.cc More PRIdN replacements. Feb 8, 2019
log.h Added colorized logging. Feb 3, 2014
map.cc Merge branch '64bit' Feb 8, 2019
map.h
match.cc
match.h
my-ctype.h Stripped RCS comments. Nov 28, 2013
my-fcntl.h
my-in.h Stripped RCS comments. Nov 28, 2013
my-inet.h
my-ioctl.h
my-math.h Stripped RCS comments. Nov 28, 2013
my-poll.h Stripped RCS comments. Nov 28, 2013
my-signal.h Stripped RCS comments. Nov 28, 2013
my-socket.h Stripped RCS comments. Nov 28, 2013
my-stat.h Stripped RCS comments. Nov 28, 2013
my-stdarg.h Stripped RCS comments. Nov 28, 2013
my-stdio.h
my-stdlib.h
my-string.h
my-stropts.h Stripped RCS comments. Nov 28, 2013
my-sys-time.h Stripped RCS comments. Nov 28, 2013
my-time.h
my-tiuser.h Stripped RCS comments. Nov 28, 2013
my-types.h
my-unistd.h Stripped RCS comments. Nov 28, 2013
my-wait.h
name_lookup.cc Quiet compiler warnings. Feb 10, 2019
name_lookup.h
net_bsd_lcl.cc Stripped RCS comments. Nov 28, 2013
net_bsd_tcp.cc
net_mp_fake.cc
net_mp_poll.cc Add sub-second forking and suspending. Bump version. May 29, 2018
net_mp_selct.cc
net_mplex.cc
net_mplex.h Stripped RCS comments. Nov 28, 2013
net_multi.cc
net_multi.h
net_proto.cc Stripped RCS comments. Nov 28, 2013
net_proto.h Stripped RCS comments. Nov 28, 2013
net_single.cc
net_sysv_lcl.cc
net_sysv_tcp.cc Stripped RCS comments. Nov 28, 2013
net_tcp.cc
network.cc Stripped RCS comments. Nov 28, 2013
network.h
numbers.cc Use Num for random() Feb 8, 2019
numbers.h Initial conversion of 32-bit integers into 64-bit integers. Feb 2, 2019
objects.cc
opcode.h Initial conversion of 32-bit integers into 64-bit integers. Feb 2, 2019
options.h
parse_cmd.cc Stripped RCS comments. Nov 28, 2013
parse_cmd.h Stripped RCS comments. Nov 28, 2013
parser.h
parser.y Initial conversion of 32-bit integers into 64-bit integers. Feb 2, 2019
pattern.cc Stripped RCS comments. Nov 28, 2013
pattern.h Stripped RCS comments. Nov 28, 2013
pcrs.c Add PCRE extension. Sep 3, 2017
pcrs.h Add PCRE extension. Sep 3, 2017
program.cc Stripped RCS comments. Nov 28, 2013
program.h Initial conversion of 32-bit integers into 64-bit integers. Feb 2, 2019
property.cc Refactor `is_object()'. Nov 27, 2016
quota.cc Hide declaring the quota property name behind the quota option. Jun 19, 2018
quota.h Stripped RCS comments. Nov 28, 2013
random.h
regexpr.c
regexpr.h Stripped RCS comments. Nov 28, 2013
restart Stripped RCS comments. Nov 28, 2013
restart.sh Stripped RCS comments. Nov 28, 2013
server.cc Rename waif :recycle to :pre_destroy for consistency. Feb 10, 2019
server.h Automatically set and at server start. Feb 7, 2019
sosemanuk.c
sosemanuk.h Integrated SOSEMANUK into random number generation. Nov 28, 2013
storage.cc Remove old code dealing with floats being complex types. Feb 7, 2019
storage.h
str_intern.cc Initial conversion of 32-bit integers into 64-bit integers. Feb 2, 2019
str_intern.h
streams.cc Initial conversion of 32-bit integers into 64-bit integers. Feb 2, 2019
streams.h
structures.h Fix compiler woes. Feb 8, 2019
sym_table.cc Use native strcasecmp and strncasecmp. Nov 15, 2018
sym_table.h Final touches on waifs. Add the 'WAIF' symbol and increment the datab… May 28, 2018
system.cc The great renaming. Jun 20, 2013
system.h Integrated System subsystem. Apr 26, 2013
t2hinit.pl
tasks.cc
tasks.h
test.yml Added testing framework and basic object/verb/property tests. May 30, 2011
thpool.c Create a thread pool to avoid the overhead of constantly creating and… Dec 24, 2018
thpool.h Create a thread pool to avoid the overhead of constantly creating and… Dec 24, 2018
timers.cc Stripped RCS comments. Nov 28, 2013
timers.h Stripped RCS comments. Nov 28, 2013
tokens.h
unparse.cc Use native strcasecmp and strncasecmp. Nov 15, 2018
unparse.h Stripped RCS comments. Nov 28, 2013
utils.cc
utils.h Use native strcasecmp and strncasecmp. Nov 15, 2018
verbs.cc Use native strcasecmp and strncasecmp. Nov 15, 2018
verbs.h Stripped RCS comments. Nov 28, 2013
version.cc Add function documentation to README. Feb 13, 2019
version.h
version_opt_gen.pl
version_options.h Inspect value of `PLAYER_HUH' option. Dec 31, 2013
waif.cc Don't allow waifs to be programmers. Feb 11, 2019
waif.h
xtrapbits.h

README.md

ToastStunt

ToastStunt is a fork of the LambdaMOO / Stunt server. It has a number of features that were found useful while developing Miriani and ChatMud, a mostly complete list of which can be found below.

Features

  • SQLite [functions: sqlite_open(), sqlite_close(), sqlite_handle(), sqlite_info(), sqlite_query(), sqlite_execute()]

  • Perl Compatible Regular Expressions (PCRE) [functions: pcre_match(), pcre_replace]

  • Simplex noise (implemented but never actually tested / used)

  • Argon2id hashing [functions: argon2(), argon2_verify()]

  • 32-bit and 64-bit versions ($maxint and $minint set automatically)

  • Waifs

    • Call :pre_destroy on waifs when they're destroyed
    • A WAIF type (so typeof(some_waif) == WAIF)
    • Waif dict patch (so waif[x] and waif[x] = y will call the :_index and :_set_index verbs on the waif)
    • '-w' command line option to convert existing databases with a different waif type to the new waif type
    • waif_stats (show how many instances of each class of waif exist, how many waifs are pending recycling, and how many waifs in total exist)
    • Parser recognition for waif properties (e.g. thing.:property)
  • Basic threading support:

    • background.cc (a library, of sorts, to make it easier to thread builtins)
    • Threaded sqlite_query and sqlite_execute functions
  • FileIO improvements:

    • Faster reading
    • Open as many files as you want, configurable with FILE_IO_MAX_FILES or $server_options.file_io_max_files
    • file_handles() (returns a list of open files)
    • file_grep() (search for a string in a file (kind of FUP in FIO, don't tell))
    • file_count_lines() (counts the number of lines in a file)
  • ANSI:

    • Parse_ansi() (parses color tags into their ANSI equivalents)
    • remove_ansi() (strips ANSI tags from strings)
  • Telnet:

    • Capture IAC commands and pass them to listener:do_out_of_band_command() for the database to handle.
  • Primitive types:

    • Support calling verbs on an object prototype ($obj_proto). Counterintuitively, this will only work for types of OBJ that are invalid. This can come in useful for un-logged-in connections (i.e. creating a set of convenient utilities for dealing with negative connections in-MOO).
  • Options.h configuration:

    • LOG_CODE_CHANGES (causes .program and set_verb_code to add a line to the server log indicating the object, verb, and programmer)
    • OWNERSHIP_QUOTA (disable the server's builtin quota management)
    • USE_ANCESTOR_CACHE (enable a cache of an object's ancestors to speed up property lookups)
    • UNSAFE_FIO (skip character by character line verification, trading off potential safety for speed)
    • LOG_EVALS (add an entry to the server log any time eval is called)
    • ONLY_32_BITS (switch from 64-bit integers back to 32-bit)
  • Additional builtins:

    • frandom (random floats)
    • distance (calculate the distance between an arbitrary number of points)
    • relative_heading (a relative bearing between two coordinate sets)
    • memory_usage (total memory used, resident set size, shared pages, text, data + stack)
    • ftime (precise time, including an argument for monotonic timing)
    • locate_by_name (quickly locate objects by their .name property)
    • usage (returns {load averages}, user time, system time, page reclaims, page faults, block input ops, block output ops, voluntary context switches, involuntary context switches, signals received)
    • explode (serverified version of the LambdaCore verb)
    • occupants (return a list of objects of parent parent, optionally with a player flag check)
    • spellcheck (uses Aspell to check spelling)
    • locations (recursive location function)
    • clear_ancestor_cache (clears the ancestor cache manually)
    • chr (return extended ASCII characters; characters that can corrupt your database are considered invalid)
  • Miscellaneous changes:

    • Numeric IP addresses in connection_name
    • Detect connections from TCP proxies using the HAProxy Proxy protocol and rewrite the source IP as appropriate (controllable with $server_options.proxy_rewrite)
    • .last_move (a map of an object's last location and the time() it moved)
    • Sub-second fork and suspend
    • Call 'do_blank_command' on listening objects when a blank command is issued
    • Allow "string" in "some other string" as a shortcut for index()
    • Allow exec to set environment variables with a new argument
    • Bandaid over an issue where emptylist loses all references and gets freed, causing a server panic
    • Change the server log message when calling switch_player()
    • Complete deprecation of tonum() in favor of toint()
    • Move #0.dump_interval to $server_options.dump_interval
    • Rename recycle() to destroy() (also call pre_destroy rather than recycle verbs)
    • New argument to notify() to suppress the newline
    • Support object lists in isa() as well as an optional third argument to return the matching parent rather than simply true or false.

Build Instructions

Debian/Ubuntu

apt install build-essential bison gperf autoconf libsqlite3-dev libaspell-dev libpcre3-dev nettle-dev g++
autoconf
./configure
make

REL/CentOS

yum group install -y "Development Tools"
yum install -y sqlite-devel pcre-devel aspell-devel nettle-devel gperf   centos-release-scl
yum install -y devtoolset-7
scl enable devtoolset-7 bash
autoconf
./configure
make
exit

Gentoo

emerge dev-db/sqlite app-text/aspell app-crypt/argon2
autoconf
./configure
make

Notes

Many distributions do not include Libargon2 which is required for Argon2id password hashing. As such, it has been included as a Git submodule in this repository. To build it yourself, follow these steps:

  1. Inside of the ToastStunt repository, checkout all available submodules: git submodule update --init
  2. cd dependencies/phc-winner-argon2
  3. Build the library: make
  4. Install it on your system: make install PREFIX=/usr

Support and Development

Realtime support and collaborative discussion for ToastStunt primarily takes place on the 'toaststunt' channel on ChatMUD. Barring this, the Miriani Message Boards are another good resource for assistance.