From 753bfac6dc8617ed93aa11c7904f04d13ca0221b Mon Sep 17 00:00:00 2001 From: The TorPSYC Team Date: Sat, 16 Nov 2013 03:12:21 +0100 Subject: [PATCH 1/3] shutdown notify fixes --- world/drivers/ldmud/master/master.c | 7 ++++--- world/net/http/configure.c | 2 +- world/net/person.c | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/world/drivers/ldmud/master/master.c b/world/drivers/ldmud/master/master.c index 87c53e8..86e1246 100644 --- a/world/drivers/ldmud/master/master.c +++ b/world/drivers/ldmud/master/master.c @@ -270,7 +270,7 @@ void notify_shutdown(string crash_reason) { object o; int i; - P3(("notify_shutdown(%O) from %O\n", crash_reason, previous_object())) + P0(("notify_shutdown(%O) from %O\n", crash_reason, previous_object())) if (previous_object() && previous_object() != this_object()) return; #if DEBUG > 0 @@ -282,7 +282,8 @@ void notify_shutdown(string crash_reason) { #endif // walk thru the shutdown path a third time in case this is a // shutdown by kill -1 process. - SIMUL_EFUN_FILE -> server_shutdown(4404, 2); + SIMUL_EFUN_FILE -> server_shutdown("notify_shutdown: "+ crash_reason, + 4404, 2); // save_wiz_file(); } @@ -290,7 +291,7 @@ void notify_shutdown(string crash_reason) { void slow_shut_down(int minutes) { SIMUL_EFUN_FILE -> shout(0, "_notice_broadcast_shutdown_panic", "Server is slowly running out of memory. Restart imminent."); - SIMUL_EFUN_FILE -> server_shutdown(1, 0); + SIMUL_EFUN_FILE -> server_shutdown("slow_shut_down: "+ minutes, 1); } // called by driver at shutdown for every user diff --git a/world/net/http/configure.c b/world/net/http/configure.c index 38516a3..0b03189 100644 --- a/world/net/http/configure.c +++ b/world/net/http/configure.c @@ -266,7 +266,7 @@ htget(prot, query, headers, qs) { s += "Your chatserver is being restarted."; // write at the bottom wouldn't be called after shutdown, would it? write(s); - shutdown(); + server_shutdown("restart by web configuration", 1); return 1; case "list_udp": { diff --git a/world/net/person.c b/world/net/person.c index 4e5a97b..33b0f8c 100644 --- a/world/net/person.c +++ b/world/net/person.c @@ -626,7 +626,7 @@ sName2(a) { "Object could not be restored!"); #ifdef PANIC_ON_NO_ADMIN - shutdown(); + server_shutdown("could not restore admin"); #endif destruct(ME); return 0; @@ -687,7 +687,7 @@ sName2(a) { "You are registered as admin, but I could not restore your data!"); // raise_error("boss without password\n"); #ifdef PANIC_ON_NO_ADMIN - shutdown(); + server_shutdown("could not restore admin"); #endif destruct(ME); return 0; From 25317717e1702302e70502dcf3ff75b04a54d0e8 Mon Sep 17 00:00:00 2001 From: The TorPSYC Team Date: Tue, 24 Dec 2013 18:14:48 +0100 Subject: [PATCH 2/3] do users want to know the complete truth about federation? --- world/default/en/jabber.textdb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/world/default/en/jabber.textdb b/world/default/en/jabber.textdb index 6430f5c..485c966 100644 --- a/world/default/en/jabber.textdb +++ b/world/default/en/jabber.textdb @@ -159,7 +159,13 @@ _failure_filter_strangers |{_failure_unsupported_function_whisper}{_failure_filter_strangers} _failure_unsuccessful_delivery_timeout_dialback -|## happens so frequently it is mostly just annoying +|## happens so frequently it is mostly just annoying (and breaks OTR) + +_failure_unsuccessful_delivery_resolve +|## happens almost as frequently and users don't care to know + +_failure_unsuccessful_delivery_repeated +|## do users want to know the complete truth about federation? _notice_received_email_UNUSED |{_notice_received_email} From 85696442851e30e6aaedd1046303d4e71eaee079 Mon Sep 17 00:00:00 2001 From: "psyc://psyced.org/~lynX" Date: Tue, 29 Apr 2014 01:49:52 +0200 Subject: [PATCH 3/3] it's even simpler with dnsmasq! thanks, alice! --- bin/psyconf | 4 +++- tor/dnsmasq.conf | 8 ++++++++ tor/unbound.conf | 7 ++++--- 3 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 tor/dnsmasq.conf diff --git a/bin/psyconf b/bin/psyconf index 8437ed2..7f121d2 100755 --- a/bin/psyconf +++ b/bin/psyconf @@ -376,7 +376,9 @@ X $torify = "torsocks"; say "Enabling PSYC federation over Tor: Using " . "torsocks wrapper around psyced.\n"; - say "Warning: Maybe, if you install unbound.conf, it actually works.\n" + say "Warning: Make sure either dnsmasq.conf or " + . "unbound.conf are in\n" + . "place for .onion resolution to function.\n"; } } ## ldmud bug number two diff --git a/tor/dnsmasq.conf b/tor/dnsmasq.conf new file mode 100644 index 0000000..3d6ccb9 --- /dev/null +++ b/tor/dnsmasq.conf @@ -0,0 +1,8 @@ +# if you already have dnsmasq on your system, +# this should go into /etc/dnsmasq.conf: + +server=/onion/127.0.0.1#9053 + +# or you can pass --server=/onion/127.0.0.1#9053 +# to dnsmasq on the command line + diff --git a/tor/unbound.conf b/tor/unbound.conf index 9534aa0..6f7d450 100644 --- a/tor/unbound.conf +++ b/tor/unbound.conf @@ -1,7 +1,8 @@ -# tell a localhost "unbound" DNS server to -# forward .onion requests into Tor -# courtesy of tg of secushare.org +# if you don't want dnsmasq on your system you +# can tell a localhost "unbound" DNS server to +# forward .onion requests into Tor. # +# courtesy of tg of secushare.org # see the unbound.conf(5) man page for more. server: