From ecc5bd32e686ca3cc5864844c5fc3b97db1b5c85 Mon Sep 17 00:00:00 2001 From: "psyc://psyced.org/~lynX" <@> Date: Tue, 26 Jan 2010 00:04:18 +0100 Subject: [PATCH] 3 bug fixes in one check-in, if we're lucky --- CHANGESTODO | 3 +++ world/net/jabber/user.c | 6 ++++-- world/net/place/archetype.gen | 2 ++ world/net/user.c | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGESTODO b/CHANGESTODO index fa82e42..4273972 100644 --- a/CHANGESTODO +++ b/CHANGESTODO @@ -12,6 +12,9 @@ ________________________________________________________________________ ________________________________________________________________________ == NEXT RELEASE ======================================================== ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +- net/jabber reissues unnecessary friend() requests whenever a user simply + reorganizes friends into other roster groups + - MASQUERADE nicks show up with recipient's nick sometimes. bad. vars were "_nick":"shouldbe","_nick_place":"welcome","_nick_local":"reallywas" it should have shown either shouldbe or reallywas, but it showed my own. diff --git a/world/net/jabber/user.c b/world/net/jabber/user.c index 7d74c5b..d842c02 100644 --- a/world/net/jabber/user.c +++ b/world/net/jabber/user.c @@ -156,10 +156,10 @@ msg(source, mc, data, mapping vars, showingLog) { ret = ::msg(source, mc, data, vars, showingLog); buddy = objectp(source) ? source -> qName() : source; jid = mkjid(source); - emit(sprintf("" + emit(sprintf("" "" "%s" - "", + "", tag, jid, IMPLODE_XML(xbuddylist[buddy], "") || "")); return ret; case "_notice_friendship_removed": @@ -362,8 +362,10 @@ presence(XMLNode node) { } # ifndef _flag_disable_module_friendship } else if (node["@type"] == "subscribe") { + PT(("XMPP subscribe: %O\n", node)) friend(0, 0, jid2ppl(node["@to"])); } else if (node["@type"] == "unsubscribe") { + PT(("XMPP unsubscribe: %O\n", node)) friend(1, 0, jid2ppl(node["@to"])); # endif // _flag_disable_module_friendship } else if (abbrev(XMPP, target)) { diff --git a/world/net/place/archetype.gen b/world/net/place/archetype.gen index cc24c61..eab4ddd 100644 --- a/world/net/place/archetype.gen +++ b/world/net/place/archetype.gen @@ -1968,6 +1968,8 @@ See the manual for details."); // should provide origin here, huh? don't have it! // let the user make it up.. remove_member(args[1], sizeof(args) > 2 && args[2]); + // apparently it's pointless if we don't save it + save(); return 1; } sendmsg(source, "_warning_usage_remove", diff --git a/world/net/user.c b/world/net/user.c index 6d5abe9..a06e85c 100644 --- a/world/net/user.c +++ b/world/net/user.c @@ -47,7 +47,7 @@ uni2nick(source, vars) { mixed u = parse_uniform(source); // unfortunately UNick already comes lowercased.. // we should start using mixed case uniforms.. - unless (ni = u[UNick]) { + unless (u && ni = u[UNick]) { // source is probably a server root raliases[source] = 0; // mark dead return source;