From 624709914bfc4ff70e892a3edebe6b9b7a273c2f Mon Sep 17 00:00:00 2001 From: "psyc://loupsycedyglgamf.onion/~lynX" Date: Sat, 20 Aug 2016 14:47:40 +0200 Subject: [PATCH] -various little things --- place/notify.c | 16 ++++++++++++++++ place/remotor.c | 5 +++-- world/net/spyc/circuit.c | 4 ++-- world/net/spyc/psyc.h | 2 +- world/net/user.c | 1 + 5 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 place/notify.c diff --git a/place/notify.c b/place/notify.c new file mode 100644 index 0000000..21a4875 --- /dev/null +++ b/place/notify.c @@ -0,0 +1,16 @@ +// typical quiet pubsub place for receiving git2psyc notifications + +#include + +#define NAME "notify" +#define SILENT +#define PLACE_HISTORY_EXPORT +#define HISTORY_METHOD "_notice_update" +#define HISTORY_GLIMPSE 4 + +// allow notifications from anywhere.. you may want to restrict this. +// see wikinotify.c and http://about.psyc.eu/create_place about that. +#define ALLOW_EXTERNAL + +#include + diff --git a/place/remotor.c b/place/remotor.c index 938e2df..4943852 100644 --- a/place/remotor.c +++ b/place/remotor.c @@ -10,13 +10,14 @@ #endif #define NAME "remoTor" -#define PRIVATE +//#define PRIVATE #define SECURE +#define SILENT //#define RESTRICTED #define PLACE_HISTORY_EXPORT #define HISTORY_GLIMPSE 7 -#define HISTORY_METHOD "_warning_remotor" +#define HISTORY_METHOD "_notice" #ifdef BRAIN # define ALLOW_EXTERNAL_FROM "psyc://psyced.org" diff --git a/world/net/spyc/circuit.c b/world/net/spyc/circuit.c index 34e1875..6b0554f 100644 --- a/world/net/spyc/circuit.c +++ b/world/net/spyc/circuit.c @@ -102,7 +102,7 @@ void sender_verification(string sourcehost, mixed targethost) // gets called during socket logon int logon(int failure) { - string t; + mixed t; sAuthHosts(([ ])); // reset authhosts legal_senders = ([ ]); instate = ([ "_INTERNAL_origin" : ME ]); @@ -141,7 +141,7 @@ int logon(int failure) { unless(isServer()) { emit("|\n"); // initial greeting if (sizeof(verify_queue)) { - foreach(mixed t : verify_queue) { + foreach(t : verify_queue) { sender_verification(t[0], t[1]); } verify_queue = ({ }); diff --git a/world/net/spyc/psyc.h b/world/net/spyc/psyc.h index c71c892..ad5fe78 100644 --- a/world/net/spyc/psyc.h +++ b/world/net/spyc/psyc.h @@ -39,7 +39,7 @@ #define PSYCPARSE_STATE_GREET 3 #define DISPATCHERROR(reason) { \ - debug_message("SPYC DISPATCH ERROR: " reason); \ + debug_message("SPYC DISPATCH ERROR: " reason "\n"); \ croak("_error_dispatch", "dispatch error: " \ reason); \ return; \ diff --git a/world/net/user.c b/world/net/user.c index 38f31fe..d0d9942 100644 --- a/world/net/user.c +++ b/world/net/user.c @@ -758,6 +758,7 @@ case "_message_echo_private": } return 0; // dont walk into _message_public if !pal #else + if (!objectp(source)) vars["_nick_target"] = nick; //FIXME BETTER break; #endif case "_message_public_question":