From 0050ebd46b8c6bfdae7fde4e2b8784954833973f Mon Sep 17 00:00:00 2001 From: "psyc://psyced.org/~lynX" <@> Date: Thu, 31 Dec 2009 21:39:07 +0100 Subject: [PATCH] route local xmpp: uniforms (thx indigo6) --- world/default/en/plain.textdb | 2 +- world/net/library.i | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/world/default/en/plain.textdb b/world/default/en/plain.textdb index 1306ba8..1faa626 100644 --- a/world/default/en/plain.textdb +++ b/world/default/en/plain.textdb @@ -1353,7 +1353,7 @@ _notice_link_service _notice_link |[_location] linked to [_identification]. -|You are now connected to this big marshmellow in the sky. +|## You are now connected to this big marshmellow in the sky. _notice_unlink_exit |I wish you good sleep or a fun night-out. diff --git a/world/net/library.i b/world/net/library.i index 3ef9933..a82aab0 100644 --- a/world/net/library.i +++ b/world/net/library.i @@ -812,10 +812,23 @@ varargs mixed sendmsg(mixed target, string mc, mixed data, vamapping vars, // fall thru case "xmpp": #ifdef SWITCH2PSYC + // maybe we should treat all of this just as if + // no scheme was given (jid treatment below) P4(("LOOKing for %O in %O\n", "psyc://"+u[UHost]+"/", targets)) tmp = targets["psyc://"+u[UHost]+"/"]; - if (tmp) { // && interactive(tmp)) { + if (tmp) { + // are we talking to our own net/root? + // in the past we used interactive() here + unless (clonep(tmp)) { + tmp = summon_person(u[UNick]); + unless (tmp) { + // doesn't have to be an error.. use jid treatment below? + sendmsg(source, "_failure_unavailable_route_place_XMPP", + "Sorry, you can't talk to a local chatroom via XMPP uniform."); + return 0; + } + } PT(("SWITCH2PSYC delivery %O for %O (%s)\n", tmp, target, mc || "0")) // we should very probably generate a redirect here instead! TODO