# Debugging commands are dangerous, and may result in granting
# administrative users access to the system account under which the
# service runs. Be very sure you trust your admins before enabling!
-# .mudpy.limit.debug: true
+.mudpy.limit.debug: true
.mudpy.limit.password_tries: 3
.mudpy.log.file: var/mudpy.log
import telnetlib
import time
+import yaml
+
# TODO(fungi) Clean this up once Python 3.5 is no longer supported
if sys.version < "3.6":
import collections
(final_cleanup, "delete remaining accounts"),
))
+debug_tests = (
+)
+
+nondebug_tests = (
+)
+
def start_service(config):
# Clean up any previously run daemon which didn't terminate
telnet_socket.send(telnetlib.IAC + telnetlib.DONT + option)
+def check_debug():
+ if len(sys.argv) > 1:
+ config = yaml.safe_load(open(sys.argv[1]))
+ return config.get(".mudpy.limit.debug", False)
+ return False
+
+
def main():
captures = ["", "", ""]
lusers = [telnetlib.Telnet(), telnetlib.Telnet(), telnetlib.Telnet()]
luser.open("::1", 4000)
luser.set_option_negotiation_callback(option_callback)
selected_dialogue = odict(dialogue)
+ if check_debug():
+ for test in nondebug_tests:
+ del selected_dialogue[test]
+ else:
+ for test in debug_tests:
+ del selected_dialogue[test]
for test, description in selected_dialogue.items():
tlog("\nTesting %s..." % description)
test_start = time.time()