3 bug fixes in one check-in, if we're lucky

This commit is contained in:
psyc://psyced.org/~lynX 2010-01-26 00:04:18 +01:00
parent 6eb8dd883f
commit ecc5bd32e6
4 changed files with 10 additions and 3 deletions

View File

@ -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.

View File

@ -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("<iq type='set'>"
emit(sprintf("<iq type='set' id='%s'>"
"<query xmlns='jabber:iq:roster'>"
"<item jid='%s' subscription='both'>%s"
"</item></query></iq>",
"</item></query></iq>", tag,
jid, IMPLODE_XML(xbuddylist[buddy], "<group>") || ""));
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)) {

View File

@ -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",

View File

@ -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;