diff --git a/CHANGESTODO b/CHANGESTODO index a3ff028..78b3c99 100644 --- a/CHANGESTODO +++ b/CHANGESTODO @@ -1488,7 +1488,7 @@ ________________________________________________________________________ is not accepted by the UNI and thus does not make it into _list_places - _do_leave does not forward the echo from remote places back to the client -- NEW_UNLINK: place and v("place") aren't in sync (new changes for psyc clients) +- place and v("place") aren't in sync (new changes for psyc clients) + if newbie: directly show register dialog (lynx should add _status_unregistered or so) diff --git a/world/net/include/net.h b/world/net/include/net.h index 0903830..92918c1 100644 --- a/world/net/include/net.h +++ b/world/net/include/net.h @@ -216,8 +216,6 @@ # define WANT_S2S_SASL # define ENTER_MEMBERS # define PERSISTENT_MASTERS -# define NEW_LINK -# define NEW_UNLINK # define NEW_RENDER # define MUCSUC #endif diff --git a/world/net/irc/server.c b/world/net/irc/server.c index 238ef2f..a1efe60 100644 --- a/world/net/irc/server.c +++ b/world/net/irc/server.c @@ -19,7 +19,9 @@ volatile string pass; // for now it's a bit complicated to re-issue all joins and i'm not // even sure if it would be enough for the irc clients.. so better -// just quit the old object and start anew. +// just quit the old object and start anew. a bit silly when user +// objects have just been incarnated and never actually logged in - +// for each ircer we thus incarnate twice. FIXME keepUserObject(user) { return 0; } qScheme() { return "irc"; } diff --git a/world/net/person.c b/world/net/person.c index 655ab8f..ebd019b 100644 --- a/world/net/person.c +++ b/world/net/person.c @@ -494,7 +494,6 @@ sLocation(string service, mixed data) { return v("locations")[service] = data; } -#ifdef NEW_LINK static linkSet(service, location, source) { P1(("linkSet(%O, %O, %O) called in %O: linking.\n", service, location, source, ME)); @@ -529,8 +528,6 @@ static linkSet(service, location, source) { // for simple clients on link when a place is set } } -#endif -#ifdef NEW_UNLINK static linkDel(service, source, variant) { string mc = "_notice_unlink"; string candidate = v("locations")[service]; @@ -558,23 +555,13 @@ static linkDel(service, source, variant) { "_identification" : v("_source") ])); return candidate; } -#endif - static linkCleanUp(variant) { mixed type, loc; foreach (type, loc : v("locations")) { P2(("linkCleanUp(%O) to %O's ex-%O-client %O\n", variant, ME, type, loc)) -#ifdef NEW_UNLINK linkDel(type, 0, variant); -#else - // no clue if the UNL is still out there.. - // lets send a ping so it can reconnect - // but first we have to delete it from our structures! - m_delete(v("locations"), 0); - sendmsg(loc, "_status_unlinked", 0, ([])); -#endif } } @@ -891,41 +878,6 @@ msg(mixed source, mc, data, mapping vars, showingLog) { if (showingLog) return display; // logView() in action // btw, when reviewing log, all users are displayed equal size -#if 0 - // hack that permits us to use same mapping across - // all user objects in a room. really should be using - // copies of the mapping for each user - or forbid to - // write into the mapping. this statement in particular - // also protects us from "intruder" _display settings, - // so it's useful anyway. - // - m_delete(vars, "_display"); -#endif -#if 0 //ndef NEW_UNLINK - if (abbrev("_request_link_", mc)) { - vars["_service"] = mc[14..]; - mc = "_set_password"; - } else if (abbrev("_request_unlink_", mc)) { - vars["_service"] = mc[16..]; - mc = "_request_unlink"; - } else if (abbrev("_request_location_", mc)) { - vars["_service"] = mc[18..]; - mc = "_request_location"; - // diese kette an abbrevs ist schrecklich ineffizient und zudem - // nicht für jede nachricht nötig.. unlink und diese failure können - // doch nur von eigenen locations kommen, also tiefergelegt werden - // in einen if (itsme) block hinein..!? im switch ist es nicht so - // tragisch, wenn methoden für bestimmte fälle gar nicht eintreten - // können, aber abbrevs die jedes mal durchgelaufen werden müssen, - // die geben mir zu denken ob das überhaupt eine gute idee war - // zusatzinformation hinten an die methode dranzuhängen. vielleicht - // ist das ja der eigentliche fehler und man sollte _method und - // _service lieber gutheissen und pflegen.. whatchathink? TODO -// } else if (abbrev("_failure_unsuccessful_delivery_", mc)) { -// vars["_method"] = mc[31..]; -// mc = "_failure_unsuccessful_delivery"; - } -#endif #ifdef RELAY remotesource = 0; #endif @@ -1062,21 +1014,8 @@ case "_set_password": // oh. we let it suggest a *different* location? // interesting. why don't we also do this for clients? // and who is using this code anyway? -#ifdef NEW_UNLINK linkDel(vars["_service"]); -#endif -#ifdef NEW_LINK linkSet(vars["_service"], vars["_location"], source); -#else - if (vars["_location"]) { - v("locations")[vars["_service"]] = vars["_location"]; - } else v("locations")[vars["_service"]] = source; - sendmsg(source, "_notice_link_"+ vars["_service"], - "You have been linked to [_service].", ([ - "_service" : vars["_service"], - ])); - register_location(source, ME); -#endif return 0; } #if 0 @@ -1115,11 +1054,7 @@ case "_set_password": } // we are a legitimate new client. // lets inform the old one -#ifdef NEW_UNLINK linkDel(0, t); -#else - sendmsg(t, "_notice_unlink"); -#endif // now we leave the old client circuit // to die off.. let's hope that's safe } @@ -1160,11 +1095,7 @@ case "_set_password": object o; save(); if (interactive(ME)) { -#ifdef NEW_UNLINK linkDel(); -#else - ME->w("_notice_unlink"); -#endif remove_interactive(ME); } o = named_clone(PSYC_PATH "user", MYNICK); @@ -1176,10 +1107,6 @@ case "_set_password": o->msg(source, mc, data, vars); return destruct(ME); } -#endif -#ifndef NEW_LINK - v("locations")[0] = source; - register_location(source, ME); #endif // used by _request_authentication if (u = parse_uniform(source)) vSet("ip", u[UHost]); @@ -1230,22 +1157,7 @@ case "_set_password": #endif // yeah right.. //unless (interactive()) vSet("host", source); -#ifdef NEW_LINK linkSet(0, vars["_location"], source); -#else - sendmsg(source, "_notice_link", 0, ([ - "_tag_reply": vars["_tag"], - "_nick" : MYNICK ])); - // PSYCion users dont have queries. - // until there are more clients this will - // be enough TODO - vDel("query"); - // clients either use _request_input - // and thus support current place and query, - // or otherwise _message to places and people - // and never use _request_input, therefore - // not get into trouble with query & place....? -#endif // moved logon after _notice_linked // which is more appropriate for most clients // lets see if theres any problem with that @@ -1317,16 +1229,11 @@ case "_set_password": :)); // dont display, dont log, it is handled async #endif return 0; +// _request_do_exit currently logs out clients anyway +// don't use this: case "_request_exit": if (itsme && source == v("locations")[0]) { -#ifdef NEW_UNLINK linkDel(0, source); -#else - sendmsg(source, "_notice_unlink_exit", - 0, ([])); - register_location(source); - m_delete(v("locations"), 0); -#endif quit(); return 0; } else { @@ -1341,15 +1248,7 @@ case "_request_unlink": member(v("locations"), vars["_service"])) { if (source == v("locations")[vars["_service"]] || checkPassword(vars["_password"])) { -#ifdef NEW_UNLINK linkDel(vars["_service"]); -#else - m_delete(v("locations"), vars["_service"]); - sendmsg(source, "_notice_unlink_"+ - vars["_service"], - "You have been unlinked from [_service].", - ([ "_service" : vars["_service"] ])); -#endif return 0; } else { // report? @@ -1358,14 +1257,7 @@ case "_request_unlink": } } else if (member(v("locations"), 0) && source == v("locations")[0]) { -#ifdef NEW_UNLINK linkDel(0); -#else - m_delete(v("locations"), 0); - register_location(source, 0); - sendmsg(source, "_notice_unlink", - 0, ([])); -#endif if (mc == "_request_unlink_disconnect" && !ONLINE) { // manually calling disconnected() .. hmmm disconnected(); @@ -2679,7 +2571,7 @@ quit(immediate, variant) { P1(("intercepted recursive QUIT %O\n", ME || MYNICK )) return 0; } - P1(("** QUITTING %O: av %O, sc %O\n", ME, availability, v("scheme"))) + P4(("** QUITTING %O: av %O, sc %O\n", ME, availability, v("scheme"))) #ifndef _flag_disable_module_presence switch(v("scheme")) { case 0: