From 48629998bada0f93bd09aae40f37bcfbf20930d1 Mon Sep 17 00:00:00 2001 From: "psyc://psyced.org/~lynX" <@> Date: Tue, 24 Mar 2009 23:17:13 +0100 Subject: [PATCH 1/3] -+-+ --- world/net/include/net.h | 4 ++++ world/net/jabber/server.c | 10 ++++++---- world/net/jabber/user.c | 2 +- world/net/person.c | 14 +++++++++++--- 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/world/net/include/net.h b/world/net/include/net.h index f57a14b..5105075 100644 --- a/world/net/include/net.h +++ b/world/net/include/net.h @@ -225,6 +225,10 @@ # define _flag_log_hosts #endif +#ifdef DEVELOPMENT +# define PARANOID +#endif + #ifdef EXPERIMENTAL # define USE_AUTOALIAS // fippo's brilliant single-user channel emulation for jabber MUCs diff --git a/world/net/jabber/server.c b/world/net/jabber/server.c index 26c4028..cada632 100644 --- a/world/net/jabber/server.c +++ b/world/net/jabber/server.c @@ -75,7 +75,7 @@ promptForPassword(user) { ([ "_tag_reply" : authtag || "", "_nick" : nick, "_resource" : resource ]) ); emitraw(""); - QUIT + QUIT // should we really close the stream here? return; // ? } P2(("nick %O, pass %O\n", nick, pass)) @@ -213,7 +213,7 @@ jabberMsg(XMLNode node) { // internal server error STREAM_ERROR("internal-server-error", "Oh dear! Internal server error") - QUIT // too hard? + // QUIT } unless (user -> isNewbie()) { // already registered to someone else @@ -221,7 +221,9 @@ jabberMsg(XMLNode node) { "" ""; emit(packet); - QUIT + // elmex says, disconnect is wrong here: + // QUIT + // it should at least close the stream } else unless ((t = helper["/username"]) && t[Cdata] && (t = helper["/password"]) && @@ -230,7 +232,7 @@ jabberMsg(XMLNode node) { "" ""; emit(packet); - QUIT + // QUIT } else { #if defined(REGISTERED_USERS_ONLY) || defined(_flag_disable_registration_XMPP) // TODO: generate some error as above diff --git a/world/net/jabber/user.c b/world/net/jabber/user.c index 088ccf2..6a50921 100644 --- a/world/net/jabber/user.c +++ b/world/net/jabber/user.c @@ -569,7 +569,7 @@ iq(XMLNode node) { target = jid2ppl(node["@to"]); isplacemsg = stringp(target) && strlen(target) && ISPLACEMSG(target); - P3(("%O IQ node %O\n", ME, node)) + P0(("+++ %O IQ node %O\n", ME, node)) firstchild = getfirstchild(node); unless(firstchild) { switch(node["@type"]) { diff --git a/world/net/person.c b/world/net/person.c index ebd019b..4cfd1a6 100644 --- a/world/net/person.c +++ b/world/net/person.c @@ -2550,11 +2550,19 @@ quit(immediate, variant) { P3(("person:QUIT(%O,%O) in %O\n", immediate,variant, ME)) // keeping services running while logging out should be possible.. but + // we currently don't do that //linkDel(0); - if (v("locations")) { + if (sizeof(v("locations"))) { // this should only trigger at first pass linkCleanUp(); - // so the if should only trigger at first pass - vDel("locations"); +#if 1 //def PARANOID + if (sizeof(v("locations"))) { + P1(("%O * Hey, linkCleanUp left us with %O\n", + ME, v("locations"))) + // we cannot vDel("locations") because the ONLINE macro + // breaks when we do + vSet("locations", ([])); + } +#endif } if (immediate == 1 || (immediate && find_call_out(#'quit) != -1)) { rc = save(); From 5eb8536f2ee598424791f5ff9436b1d60521f0ae Mon Sep 17 00:00:00 2001 From: "psyc://psyced.org/~lynX" <@> Date: Thu, 9 Apr 2009 10:49:37 +0200 Subject: [PATCH 2/3] + --- world/net/person.c | 4 ++-- world/net/place/archetype.gen | 2 +- world/net/usercmd.i | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/world/net/person.c b/world/net/person.c index 043b2ee..5cf5418 100644 --- a/world/net/person.c +++ b/world/net/person.c @@ -495,7 +495,7 @@ sLocation(string service, mixed data) { } static linkSet(service, location, source) { - P1(("linkSet(%O, %O, %O) called in %O: linking.\n", + P2(("linkSet(%O, %O, %O) called in %O: linking.\n", service, location, source, ME)); // sLocation? unless (location) location = source; @@ -536,7 +536,7 @@ static linkDel(service, source, variant) { service, source, ME)); return 0; } - P1(("linkDel(%O, %O) called in %O: unlinking %O.\n", + P2(("linkDel(%O, %O) called in %O: unlinking %O.\n", service, source, ME, candidate)); unless (source) source = candidate; // sLocation? diff --git a/world/net/place/archetype.gen b/world/net/place/archetype.gen index 2194cf2..72e0d4e 100644 --- a/world/net/place/archetype.gen +++ b/world/net/place/archetype.gen @@ -1069,7 +1069,7 @@ msg(source, mc, data, mapping vars) { } // uni and unl differ if (t != source) { -P1(("ident: %O is really %O\n", t, source)) + P2(("@%s knows: %O is really %O\n", MYNICK, t, source)) //source = t; // if (!member(vars, "_nick")) -- dont trust the UNL if (objectp(source)) { diff --git a/world/net/usercmd.i b/world/net/usercmd.i index fd5e22a..5511631 100644 --- a/world/net/usercmd.i +++ b/world/net/usercmd.i @@ -1777,6 +1777,10 @@ case "_exit": case "_quit": // bye(vars["_reason"]); quit(); + // + // this shouldn't be necessary!! + //call_out( (: destruct(ME) :) , 30); + // i hope it isnt.. return 1; case "_show_log": // _list_log ? case "_log": From 1b8efa17b01822d462128cbd8c65cc5b7aa7b420 Mon Sep 17 00:00:00 2001 From: "psyc://psyced.org/~lynX" <@> Date: Fri, 10 Apr 2009 05:02:35 +0200 Subject: [PATCH 3/3] don't get upset by _message_video --- world/net/person.c | 5 +++++ world/net/place/archetype.gen | 4 ++-- world/net/user.c | 6 ++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/world/net/person.c b/world/net/person.c index c4d4224..eec58b2 100644 --- a/world/net/person.c +++ b/world/net/person.c @@ -1318,6 +1318,11 @@ case "_message_echo": case "_message_public": // avoid treating this as _message here break; +case "_message_video": +case "_message_audio": + // not being displayed to users other than psyc clients + data = 0; + break; case "_message": // this is only visible in person.c, not user.c // therefore probably useless diff --git a/world/net/place/archetype.gen b/world/net/place/archetype.gen index 72e0d4e..44a5b24 100644 --- a/world/net/place/archetype.gen +++ b/world/net/place/archetype.gen @@ -1414,8 +1414,8 @@ msg(source, mc, data, mapping vars) { return 0; } // ist das die nette antwort auf /m channel ? - // vorsicht aber mit _message_public_question - if (!abbrev("_message_public", mc)) mc = "_message_public"; + if (mc == "_message_private") mc = "_message_public"; + // vorsicht mit _message_public_question und _message_video } /* if the source is not a member of the room and was allowed * because of qAllowExternal* we probably should use the rooms diff --git a/world/net/user.c b/world/net/user.c index f18fce2..a2e132d 100644 --- a/world/net/user.c +++ b/world/net/user.c @@ -615,6 +615,12 @@ case "_jabber_iq_set": case "_jabber": P1(("%O got %O", ME, mc)) break; +case "_message_video": +case "_message_audio": + // not being displayed to users other than psyc clients + if (v("scheme") != "psyc") return 1; + data = ""; // temporary for @welcome history + break; case "_message_private_question": variant = "_ask" + variant; m_delete(vars, "_action");