mirror of
git://git.psyced.org/git/psyced
synced 2024-08-15 03:25:10 +00:00
multiple connections per user
This commit is contained in:
parent
ecc5bd32e6
commit
3c782db411
5 changed files with 132 additions and 89 deletions
|
@ -152,7 +152,8 @@ sendmsg(target, mc, data, vars, source, showingLog, callback) {
|
||||||
//
|
//
|
||||||
// great, if I ping xmpp:fippo@amessage.de this makes
|
// great, if I ping xmpp:fippo@amessage.de this makes
|
||||||
// is xmpp:fippo@amessage.de/foo, but I DONT WANT THAT!
|
// is xmpp:fippo@amessage.de/foo, but I DONT WANT THAT!
|
||||||
target = t;
|
if (!objectp(target) || (objectp(target) && target->vQuery("scheme") != "psyc"))
|
||||||
|
target = t;
|
||||||
}
|
}
|
||||||
#endif //}}}
|
#endif //}}}
|
||||||
#ifdef FORK //{{{
|
#ifdef FORK //{{{
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
#ifdef RELAY
|
#ifdef RELAY
|
||||||
# define ONLINE (availability != 0)
|
# define ONLINE (availability != 0)
|
||||||
#else
|
#else
|
||||||
# define ONLINE (ME && (interactive(ME) || v("locations")[0]))
|
# define ONLINE (ME && (interactive(ME) || (member(v("locations"), 0) && sizeof(v("locations")[0]))))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef NO_NEWBIES
|
#ifdef NO_NEWBIES
|
||||||
|
|
|
@ -473,7 +473,8 @@ qDescription(source, vars, profile, itsme) {
|
||||||
|
|
||||||
qLocation(string service) {
|
qLocation(string service) {
|
||||||
ASSERT("qLocation", v("locations"), v("locations"))
|
ASSERT("qLocation", v("locations"), v("locations"))
|
||||||
return v("locations")[service];
|
// which location should we return? it just returns one for now. (only used from sip/udp)
|
||||||
|
if (member(v("locations"), service) && sizeof(v("locations")[service])) return m_indices(v("locations")[service])[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
// returns 0 if that was just an update. 1 on success.
|
// returns 0 if that was just an update. 1 on success.
|
||||||
|
@ -485,13 +486,18 @@ sLocation(string service, mixed data) {
|
||||||
// yes because a delivery error should remove clients
|
// yes because a delivery error should remove clients
|
||||||
// from the location table, too.. not just proper
|
// from the location table, too.. not just proper
|
||||||
// unlink requests FIXME
|
// unlink requests FIXME
|
||||||
if (v("locations")[service] == data) return 0;
|
if (member(v("locations"), service) && member(v("locations")[service], data)) return 0;
|
||||||
unless (data) {
|
unless (data) {
|
||||||
string retval = v("locations")[service];
|
//string retval = v("locations")[service];
|
||||||
m_delete(v("locations"), service);
|
m_delete(v("locations"), service);
|
||||||
return retval;
|
return 1; //retval;
|
||||||
}
|
}
|
||||||
return v("locations")[service] = data;
|
if (member(v("locations"), service)) {
|
||||||
|
v("locations")[service] += ([ data ]);
|
||||||
|
} else {
|
||||||
|
v("locations")[service] = ([ data ]);
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static linkSet(service, location, source) {
|
static linkSet(service, location, source) {
|
||||||
|
@ -501,7 +507,11 @@ static linkSet(service, location, source) {
|
||||||
unless (location) location = source;
|
unless (location) location = source;
|
||||||
else unless (source) unless (source = location)
|
else unless (source) unless (source = location)
|
||||||
raise_error("You have to provide either source or location!\n");
|
raise_error("You have to provide either source or location!\n");
|
||||||
v("locations")[service] = location;
|
if (member(v("locations"), service)) {
|
||||||
|
v("locations")[service] += ([ location ]);
|
||||||
|
} else {
|
||||||
|
v("locations")[service] = ([ location ]);
|
||||||
|
}
|
||||||
register_location(location, ME);
|
register_location(location, ME);
|
||||||
if (service) sendmsg(source, "_notice_link_service", 0,
|
if (service) sendmsg(source, "_notice_link_service", 0,
|
||||||
([ "_service" : service,
|
([ "_service" : service,
|
||||||
|
@ -527,33 +537,44 @@ static linkSet(service, location, source) {
|
||||||
// <lynX> psyced acts indeed too complicated
|
// <lynX> psyced acts indeed too complicated
|
||||||
// for simple clients on link when a place is set
|
// for simple clients on link when a place is set
|
||||||
}
|
}
|
||||||
|
P2(("locations after linkSet: %O\n", v("locations")))
|
||||||
}
|
}
|
||||||
static linkDel(service, source, variant) {
|
static linkDel(service, source, variant) {
|
||||||
|
P3(("linkDel(%O, %O, %O) called in %O!\n", service, source, variant, ME))
|
||||||
string mc = "_notice_unlink";
|
string mc = "_notice_unlink";
|
||||||
string candidate = v("locations")[service];
|
service = service || 0;
|
||||||
unless (candidate) {
|
|
||||||
|
unless (member(v("locations"), service)) {
|
||||||
P3(("linkDel(%O, %O) called in %O: no such candidate!\n",
|
P3(("linkDel(%O, %O) called in %O: no such candidate!\n",
|
||||||
service, source, ME));
|
service, source, ME));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
P2(("linkDel(%O, %O) called in %O: unlinking %O.\n",
|
|
||||||
service, source, ME, candidate));
|
int n = 0;
|
||||||
unless (source) source = candidate;
|
foreach(string candidate : v("locations")[service]) {
|
||||||
// sLocation?
|
if ((objectp(source) && find_target_handler(candidate) != source) ||
|
||||||
register_location(candidate, 0);
|
(source && !objectp(source) && candidate != source)) continue;
|
||||||
// maybe actual deletion would need to be delayed after
|
P2(("linkDel(%O, %O) called in %O: unlinking %O.\n",
|
||||||
// letting locations know. they might still be sending
|
service, source, ME, candidate));
|
||||||
// stuff to us, right?
|
// sLocation?
|
||||||
m_delete(v("locations"), service || 0);
|
register_location(candidate, 0);
|
||||||
if (variant) mc += variant;
|
// maybe actual deletion would need to be delayed after
|
||||||
if (service) sendmsg(source, mc, 0,
|
// letting locations know. they might still be sending
|
||||||
([ "_service" : service,
|
// stuff to us, right?
|
||||||
"_location_service" : candidate,
|
m_delete(v("locations")[service], candidate);
|
||||||
"_identification" : v("_source") ]));
|
unless (sizeof(v("locations")[service]))
|
||||||
else sendmsg(source, mc, 0,
|
m_delete(v("locations"), service);
|
||||||
([ "_location" : candidate,
|
if (variant) mc += variant;
|
||||||
"_identification" : v("_source") ]));
|
if (service) sendmsg(candidate, mc, 0,
|
||||||
return candidate;
|
([ "_service" : service,
|
||||||
|
"_location_service" : candidate,
|
||||||
|
"_identification" : v("_source") ]));
|
||||||
|
else sendmsg(candidate, mc, 0,
|
||||||
|
([ "_location" : candidate,
|
||||||
|
"_identification" : v("_source") ]));
|
||||||
|
n++;
|
||||||
|
}
|
||||||
|
return n;
|
||||||
}
|
}
|
||||||
static linkCleanUp(variant) {
|
static linkCleanUp(variant) {
|
||||||
mixed type, loc;
|
mixed type, loc;
|
||||||
|
@ -976,21 +997,26 @@ case "_request_location":
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (vars["_service"] && member(v("locations"), vars["_service"])) {
|
if (vars["_service"] && member(v("locations"), vars["_service"])) {
|
||||||
// service
|
foreach (string location : v("locations")[vars["_service"]]) {
|
||||||
sendmsg(source, "_info_location_"+ vars["_service"],
|
// service
|
||||||
"[_service] has location [_location].",
|
sendmsg(source, "_info_location_"+ vars["_service"],
|
||||||
([
|
"[_service] has location [_location].",
|
||||||
"_service" : vars["_service"],
|
([
|
||||||
"_tag" : vars["_tag"],
|
"_service" : vars["_service"],
|
||||||
"_location" : v("locations")[vars["_service"]],
|
"_tag" : vars["_tag"],
|
||||||
]));
|
"_location" : location,
|
||||||
} else
|
]));
|
||||||
sendmsg(source, "_info_location", 0,
|
}
|
||||||
([
|
} else {
|
||||||
"_nick" : MYNICK,
|
foreach (string location : v("locations")[0]) {
|
||||||
"_tag" : vars["_tag"],
|
sendmsg(source, "_info_location", 0,
|
||||||
"_location" : v("locations")[0]
|
([
|
||||||
]));
|
"_nick" : MYNICK,
|
||||||
|
"_tag" : vars["_tag"],
|
||||||
|
"_location" : location
|
||||||
|
]));
|
||||||
|
}
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
case "_request_link":
|
case "_request_link":
|
||||||
case "_set_password":
|
case "_set_password":
|
||||||
|
@ -1011,14 +1037,13 @@ case "_set_password":
|
||||||
// TODO? add support for integer _service means multiple
|
// TODO? add support for integer _service means multiple
|
||||||
// catch-all clients possible. do we want this?
|
// catch-all clients possible. do we want this?
|
||||||
if (vars["_service"]) {
|
if (vars["_service"]) {
|
||||||
linkDel(vars["_service"]);
|
//linkDel(vars["_service"]);
|
||||||
linkSet(vars["_service"], vars["_location"], source);
|
linkSet(vars["_service"], vars["_location"], source);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
// this code should also run for _service, but it
|
// this code should also run for _service, but it
|
||||||
// needs a reorg
|
// needs a reorg
|
||||||
t = v("locations")[0];
|
if (member(v("locations"), 0) && sizeof(v("locations")[0]) && !member(v("locations")[0], source)) {
|
||||||
if (t && t != source) {
|
|
||||||
// alright. we have another client
|
// alright. we have another client
|
||||||
// already, or it is a ghost.
|
// already, or it is a ghost.
|
||||||
if (!vars["_password"] && ONLINE) {
|
if (!vars["_password"] && ONLINE) {
|
||||||
|
@ -1030,7 +1055,7 @@ case "_set_password":
|
||||||
}
|
}
|
||||||
// we are a legitimate new client.
|
// we are a legitimate new client.
|
||||||
// lets inform the old one
|
// lets inform the old one
|
||||||
linkDel(0, t);
|
//linkDel(0, t);
|
||||||
// now we leave the old client circuit
|
// now we leave the old client circuit
|
||||||
// to die off.. let's hope that's safe
|
// to die off.. let's hope that's safe
|
||||||
}
|
}
|
||||||
|
@ -1207,7 +1232,7 @@ case "_set_password":
|
||||||
// _request_do_exit currently logs out clients anyway
|
// _request_do_exit currently logs out clients anyway
|
||||||
// don't use this:
|
// don't use this:
|
||||||
case "_request_exit":
|
case "_request_exit":
|
||||||
if (itsme && source == v("locations")[0]) {
|
if (itsme && member(v("locations"), 0) && member(v("locations")[0], source)) {
|
||||||
linkDel(0, source);
|
linkDel(0, source);
|
||||||
quit();
|
quit();
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1221,9 +1246,9 @@ case "_request_unlink_disconnect":
|
||||||
case "_request_unlink":
|
case "_request_unlink":
|
||||||
if (vars["_service"] &&
|
if (vars["_service"] &&
|
||||||
member(v("locations"), vars["_service"])) {
|
member(v("locations"), vars["_service"])) {
|
||||||
if (source == v("locations")[vars["_service"]]
|
if (member(v("locations")[vars["_service"]], source)
|
||||||
|| checkPassword(vars["_password"])) {
|
|| checkPassword(vars["_password"])) {
|
||||||
linkDel(vars["_service"]);
|
linkDel(vars["_service"], source);
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
// report?
|
// report?
|
||||||
|
@ -1231,8 +1256,8 @@ case "_request_unlink":
|
||||||
ME, mc, source, vars["_service"]))
|
ME, mc, source, vars["_service"]))
|
||||||
}
|
}
|
||||||
} else if (member(v("locations"), 0)
|
} else if (member(v("locations"), 0)
|
||||||
&& source == v("locations")[0]) {
|
&& member(v("locations")[0], source)) {
|
||||||
linkDel(0);
|
linkDel(0, source);
|
||||||
if (mc == "_request_unlink_disconnect" && !ONLINE) {
|
if (mc == "_request_unlink_disconnect" && !ONLINE) {
|
||||||
// manually calling disconnected() .. hmmm
|
// manually calling disconnected() .. hmmm
|
||||||
disconnected();
|
disconnected();
|
||||||
|
@ -1893,8 +1918,9 @@ case "_notice_presence_here_busy":
|
||||||
// messages from here though, we do it from w().
|
// messages from here though, we do it from w().
|
||||||
// the other solution would be to forward in user.c
|
// the other solution would be to forward in user.c
|
||||||
// then we dont have to split the switches
|
// then we dont have to split the switches
|
||||||
t = v("locations")[0];
|
//P2((">>>> locations: %O\n", v("locations")))
|
||||||
if (t && t != source) {
|
foreach (t : v("locations")[0]) {
|
||||||
|
if (t && t != source) {
|
||||||
// no psyctext rendering happening in this variant
|
// no psyctext rendering happening in this variant
|
||||||
# ifdef _flag_enable_circuit_proxy_multiplexing
|
# ifdef _flag_enable_circuit_proxy_multiplexing
|
||||||
vars["_target_forward"] = t;
|
vars["_target_forward"] = t;
|
||||||
|
@ -1904,6 +1930,7 @@ case "_notice_presence_here_busy":
|
||||||
// net/user:msg shouldn't work on this any further,
|
// net/user:msg shouldn't work on this any further,
|
||||||
// should it?
|
// should it?
|
||||||
display = 0;
|
display = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// here we can filter things that do not belong into the lastlog
|
// here we can filter things that do not belong into the lastlog
|
||||||
// but shouldn't we simply log _message's only?
|
// but shouldn't we simply log _message's only?
|
||||||
|
@ -2267,9 +2294,9 @@ checkAuthentication(source, vars) {
|
||||||
mixed *u;
|
mixed *u;
|
||||||
|
|
||||||
// we should probably foreach this too TODO
|
// we should probably foreach this too TODO
|
||||||
if (v("locations")[0] == vars["_location"]) return 5;
|
if (member(v("locations")[0], vars["_location"])) return 5;
|
||||||
// assumes v("locations")[X] is lower_case according to policy
|
// assumes v("locations")[X] is lower_case according to policy
|
||||||
if (v("locations")[0] == lower_case(vars["_location"]))
|
if (member(v("locations")[0], lower_case(vars["_location"])))
|
||||||
return 4;
|
return 4;
|
||||||
unless (u = parse_uniform(vars["_location"])) return -1;
|
unless (u = parse_uniform(vars["_location"])) return -1;
|
||||||
|
|
||||||
|
@ -2559,8 +2586,9 @@ quit(immediate, variant) {
|
||||||
|
|
||||||
P3(("person:QUIT(%O,%O) in %O\n", immediate,variant, ME))
|
P3(("person:QUIT(%O,%O) in %O\n", immediate,variant, ME))
|
||||||
// keeping services running while logging out should be possible.. but
|
// keeping services running while logging out should be possible.. but
|
||||||
// we currently don't do that
|
// we currently don't do that -- now we do
|
||||||
//linkDel(0);
|
linkDel(0, previous_object());
|
||||||
|
#if 0
|
||||||
if (sizeof(v("locations"))) { // this should only trigger at first pass
|
if (sizeof(v("locations"))) { // this should only trigger at first pass
|
||||||
linkCleanUp();
|
linkCleanUp();
|
||||||
#if 1 //def PARANOID
|
#if 1 //def PARANOID
|
||||||
|
@ -2573,6 +2601,7 @@ quit(immediate, variant) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if (immediate == 1 || (immediate && find_call_out(#'quit) != -1)) {
|
if (immediate == 1 || (immediate && find_call_out(#'quit) != -1)) {
|
||||||
rc = save();
|
rc = save();
|
||||||
if (sizeof(places)) {
|
if (sizeof(places)) {
|
||||||
|
@ -2677,12 +2706,15 @@ quit(immediate, variant) {
|
||||||
#endif
|
#endif
|
||||||
logged_on = 0;
|
logged_on = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (immediate) {
|
if (immediate) {
|
||||||
destruct(ME);
|
destruct(ME);
|
||||||
} else {
|
} else {
|
||||||
vDel("scheme");
|
|
||||||
remove_interactive(ME);
|
remove_interactive(ME);
|
||||||
leaving = 0;
|
leaving = 0;
|
||||||
|
// return if there are some services/clients left
|
||||||
|
if (sizeof(v("locations"))) return rc;
|
||||||
|
vDel("scheme");
|
||||||
call_out(#'quit, 20, 1, variant);
|
call_out(#'quit, 20, 1, variant);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
|
@ -787,7 +787,7 @@ case "_status_description_place":
|
||||||
switch (variant) {
|
switch (variant) {
|
||||||
default:
|
default:
|
||||||
// client doesn't want HTML
|
// client doesn't want HTML
|
||||||
if (v("locations")[0]) sendmsg(v("locations")[0],
|
if (sizeof(v("locations")[0])) sendmsg(m_indices(v("locations")[0])[0],
|
||||||
mc, data, ([
|
mc, data, ([
|
||||||
"_tag_reply": t,
|
"_tag_reply": t,
|
||||||
"_source_relay": source,
|
"_source_relay": source,
|
||||||
|
@ -796,7 +796,7 @@ case "_status_description_place":
|
||||||
return 1;
|
return 1;
|
||||||
case "_HTML":
|
case "_HTML":
|
||||||
// client wants HTML
|
// client wants HTML
|
||||||
if (v("locations")[0]) sendmsg(v("locations")[0],
|
if (sizeof(v("locations")[0])) sendmsg(m_indices(v("locations")[0])[0],
|
||||||
mc+"_HTML", htDescription(), ([
|
mc+"_HTML", htDescription(), ([
|
||||||
"_type_data": "text/html",
|
"_type_data": "text/html",
|
||||||
"_tag_reply": t,
|
"_tag_reply": t,
|
||||||
|
@ -916,21 +916,23 @@ case "_failure_unsuccessful_delivery":
|
||||||
case "_failure_network_connect_invalid_port":
|
case "_failure_network_connect_invalid_port":
|
||||||
// is this the right place to do this? i have seen a recursion where
|
// is this the right place to do this? i have seen a recursion where
|
||||||
// person.c was never asked for opinion, so i'm putting this into user.c
|
// person.c was never asked for opinion, so i'm putting this into user.c
|
||||||
#ifdef ALPHA
|
#if 0 //def ALPHA
|
||||||
string loc;
|
string loc;
|
||||||
foreach (t, loc : v("locations"))
|
foreach (t, loc : v("locations")s)
|
||||||
if (vars["_source_relay"] == loc) {
|
if (member(loc, vars["_source_relay"])) {
|
||||||
P1(("%O in %O talking to its %O location at %O.",
|
P1(("%O in %O talking to its %O location at %O.",
|
||||||
mc, ME, t, loc))
|
mc, ME, t, loc))
|
||||||
sLocation(t, 0);
|
sLocation(t, 0);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
// TODO: walk thru entire locations mapping!
|
foreach (string type, mapping locs : v("locations")) {
|
||||||
if (vars["_source_relay"] == v("locations")[0]) {
|
if (member(locs, vars["_source_relay"])) {
|
||||||
P0(("%O got %O, deleting 0 from %O\n", ME,
|
P0(("%O got %O, deleting %O from %O\n", ME, mc, vars["_source_relay"], v("locations")))
|
||||||
mc, v("locations")))
|
m_delete(locs, vars["_source_relay"]);
|
||||||
m_delete(v("locations"), 0);
|
unless (sizeof(locs)) m_delete(v("locations"), type);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
P4(("locations left: %O\n", v("locations")))
|
||||||
#endif
|
#endif
|
||||||
// fall thru - not strictly necessary but adds a feature
|
// fall thru - not strictly necessary but adds a feature
|
||||||
case "_failure_redirect_permanent":
|
case "_failure_redirect_permanent":
|
||||||
|
@ -1260,6 +1262,7 @@ pr(mc, fmt, a,b,c,d,e,f,g,h,i,j,k) {
|
||||||
//
|
//
|
||||||
w(string mc, string data, mapping vars, mixed source, int showingLog) {
|
w(string mc, string data, mapping vars, mixed source, int showingLog) {
|
||||||
string template, output, type, loc;
|
string template, output, type, loc;
|
||||||
|
mapping locs;
|
||||||
mapping di = printStyle(mc); // display infos
|
mapping di = printStyle(mc); // display infos
|
||||||
int t;
|
int t;
|
||||||
|
|
||||||
|
@ -1286,13 +1289,13 @@ w(string mc, string data, mapping vars, mixed source, int showingLog) {
|
||||||
|
|
||||||
//PT(("%O user:w(%O,%O..%O) - %O\n", ME,mc,data,source, template))
|
//PT(("%O user:w(%O,%O..%O) - %O\n", ME,mc,data,source, template))
|
||||||
P4(("%O user:w locations %O\n", ME, v("locations")))
|
P4(("%O user:w locations %O\n", ME, v("locations")))
|
||||||
foreach (type, loc : v("locations")) {
|
foreach (type, locs : v("locations")) {
|
||||||
// check uniformness of location here?
|
// check uniformness of location here?
|
||||||
// no! no broken location should have made it into the
|
// no! no broken location should have made it into the
|
||||||
// mapping at this point. if you need to check it, check
|
// mapping at this point. if you need to check it, check
|
||||||
// it in sLocation()
|
// it in sLocation()
|
||||||
#if DEBUG > 0
|
#if DEBUG > 0
|
||||||
if (!loc) {
|
if (!sizeof(locs)) {
|
||||||
// oh.. happens on beta?
|
// oh.. happens on beta?
|
||||||
P1(("%O late deletion of a %O zero location - should never happen\n", ME, type))
|
P1(("%O late deletion of a %O zero location - should never happen\n", ME, type))
|
||||||
//m_delete(v("locations"), type);
|
//m_delete(v("locations"), type);
|
||||||
|
@ -1363,25 +1366,27 @@ w(string mc, string data, mapping vars, mixed source, int showingLog) {
|
||||||
#else
|
#else
|
||||||
# echo No LPC? Wow. Good luck!
|
# echo No LPC? Wow. Good luck!
|
||||||
#endif
|
#endif
|
||||||
|
foreach (loc : locs) {
|
||||||
#ifdef _flag_enable_circuit_proxy_multiplexing
|
#ifdef _flag_enable_circuit_proxy_multiplexing
|
||||||
// this is necessary when a single proxy is emulating
|
// this is necessary when a single proxy is emulating
|
||||||
// several clients for several users. to figure out
|
// several clients for several users. to figure out
|
||||||
// which context stuff is forwarded to which client
|
// which context stuff is forwarded to which client
|
||||||
// we need to add this _target_forward. this is not the
|
// we need to add this _target_forward. this is not the
|
||||||
// way psyc should operate in the long term. psyc clients
|
// way psyc should operate in the long term. psyc clients
|
||||||
// should be integrated into the context distribution
|
// should be integrated into the context distribution
|
||||||
// tree themselves, thus the proxy would manage a cslave
|
// tree themselves, thus the proxy would manage a cslave
|
||||||
// for them instead of accepting forwards from each UNI
|
// for them instead of accepting forwards from each UNI
|
||||||
vars["_target_forward"] = loc;
|
vars["_target_forward"] = loc;
|
||||||
// maybe this can be avoided when no _context is set...?
|
// maybe this can be avoided when no _context is set...?
|
||||||
P3(("%O user:w forwarding %O to %O\n", ME, mc, vars["_target_forward"]))
|
P3(("%O user:w forwarding %O to %O\n", ME, mc, vars["_target_forward"]))
|
||||||
#endif
|
#endif
|
||||||
sendmsg(loc, mc, nudata, vars);
|
sendmsg(loc, mc, nudata, vars);
|
||||||
// PT(("PSYCW: %s -> %O (%O)\n", mc, loc, vars))
|
// PT(("PSYCW: %s -> %O (%O)\n", mc, loc, vars))
|
||||||
#if DEBUG > 1
|
#if DEBUG > 1
|
||||||
log_file("PSYCW", "%s(%O) %O » %O\n", mc, type,
|
log_file("PSYCW", "%s(%O) %O » %O\n", mc, type,
|
||||||
nudata, type && loc);
|
nudata, type && loc);
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1701,6 +1706,11 @@ quit(immediate, variant) {
|
||||||
//
|
//
|
||||||
// we also call this manually from _request_unlink_disconnect
|
// we also call this manually from _request_unlink_disconnect
|
||||||
disconnected(remainder) {
|
disconnected(remainder) {
|
||||||
|
P2(("disconnected(%O) called in %O\nlocations: %O\n", remainder, ME, v("locations")))
|
||||||
|
// if there are any catch-all connections left don't quit, just delete link
|
||||||
|
if (member(v("locations"), 0) && sizeof(v("locations")[0]) > 1)
|
||||||
|
return linkDel(0, previous_object());
|
||||||
|
|
||||||
// user did not detach his client properly. we'll make a wild guess
|
// user did not detach his client properly. we'll make a wild guess
|
||||||
// at how many messages he may have missed - enough to make the user
|
// at how many messages he may have missed - enough to make the user
|
||||||
// check the lastlog if that's not enough.
|
// check the lastlog if that's not enough.
|
||||||
|
|
|
@ -2191,8 +2191,8 @@ protected speak(a, dest, room) {
|
||||||
// sayvars["_nick_long"] = v("longname");
|
// sayvars["_nick_long"] = v("longname");
|
||||||
#ifdef VOLATILE
|
#ifdef VOLATILE
|
||||||
// what about peer scheme, host and -port
|
// what about peer scheme, host and -port
|
||||||
sayvars["_location"] = v("locations")[0] ||
|
sayvars["_location"] = (member(v("locations"), 0) && sizeof(v("locations")[0])) ?
|
||||||
v("scheme")+"://"+v("host")+":-"+query_mud_port();
|
m_indices(v("locations")[0])[0] : v("scheme")+"://"+v("host")+":-"+query_mud_port();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#ifndef NO_PUBLIC_QUESTIONS
|
#ifndef NO_PUBLIC_QUESTIONS
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue