diff --git a/world/net/entity.c b/world/net/entity.c index 06c0db7..682abf5 100644 --- a/world/net/entity.c +++ b/world/net/entity.c @@ -426,7 +426,7 @@ msg(source, mc, data, vars) { // and have it replaced by object.. but that's not the case // we _could_ however do that by using _uniform_trustee // and doing is_localhost on all _uniform's at parsing time - if (is_localhost(u[UHost])) trustee_nick = u[UNick]; + if (is_localhost(lower_case(u[UHost]))) trustee_nick = u[UNick]; } if (get_trust(trustee_nick, 0) < MINIMUM_TRUST) return 1; // entweder trustee ist ein local nick, dann kriegen wir den diff --git a/world/net/library.i b/world/net/library.i index a893b3a..34ac854 100644 --- a/world/net/library.i +++ b/world/net/library.i @@ -658,7 +658,7 @@ int xmpp_sendmsg(mixed target, string mc, mixed data, mapping vars, if (o = targets[tmp]) { P2(("%O to be delivered on %O\n", otarget, o )) - } else if (is_localhost(u[UHost])) { + } else if (is_localhost(lower_case(u[UHost]))) { unless (u[UUser]) { P0(("Intercepted %O to %O from %O\n", mc, target, source)) // 0 makes sendmsg try to relay via xmpp.scheme.psyced.org diff --git a/world/net/person.c b/world/net/person.c index 4d46681..f3912e6 100644 --- a/world/net/person.c +++ b/world/net/person.c @@ -2525,7 +2525,7 @@ logon(host) { && mode[PPL_NOTIFY] >= PPL_NOTIFY_FRIEND) continue; if (u = parse_uniform(ni)) { // first we change the ppl, then we need this code -// if (is_localhost(u[UHost])) { +// if (is_localhost(lower_case(u[UHost]))) { // o = summon_person(u[UNick]); // insert_member(o); // } else { diff --git a/world/net/psyc/library.i b/world/net/psyc/library.i index fcbc955..46f551c 100644 --- a/world/net/psyc/library.i +++ b/world/net/psyc/library.i @@ -411,6 +411,7 @@ int psyc_sendmsg(mixed target, string mc, mixed data, mapping vars, unless (buf) return 0; #endif /* NEW_RENDER */ + // host seems to already be in lower_case if (is_localhost(host)) return send_udp(host, port, buf); PT(("dns_resolve + send_udp %O:%O packet:\n%s", host,port,buf)) dns_resolve(host, (: if (stringp($1)) diff --git a/world/net/psyc/parse.i b/world/net/psyc/parse.i index 7f149be..0da0396 100644 --- a/world/net/psyc/parse.i +++ b/world/net/psyc/parse.i @@ -983,8 +983,8 @@ protected int deliver(mixed ip, string host, string mc, string buffer, mapping c cvars["_INTERNAL_nick_target"] = u[UNick]; #endif P3(("DEBUG: is_localhost is %O for %O of %O\n", - is_localhost(u[UHost]), u[UHost], u)) - unless (is_localhost(u[UHost])) { + is_localhost(lower_case(u[UHost])), u[UHost], u)) + unless (is_localhost(lower_case(u[UHost]))) { if (trustworthy > 7) { P1(("RELAYING permitted for %O to %O (%O)\n", source, t, ME)) diff --git a/world/net/sip/udp.c b/world/net/sip/udp.c index d53d044..75c3384 100644 --- a/world/net/sip/udp.c +++ b/world/net/sip/udp.c @@ -107,7 +107,7 @@ parseUDP(ip, port, msg) { send_udp(ip, port, reply); return; } - islocaltarget = is_localhost(tu[UHost]); + islocaltarget = is_localhost(lower_case(tu[UHost])); // TODO this may be either local or remote users if (islocaltarget && tu[UUser]) target = find_person(tu[UUser]); // TODO works only for online users @@ -156,7 +156,7 @@ parseUDP(ip, port, msg) { su = parse_uniform(source); source = 0; #if 0 - if (is_localhost(su[UHost])) { + if (is_localhost(lower_case(su[UHost]))) { object o; o = find_person(su[UUser]); // TODO: check that source is coming from diff --git a/world/net/spyc/circuit.c b/world/net/spyc/circuit.c index 4c0383c..3eaff45 100644 --- a/world/net/spyc/circuit.c +++ b/world/net/spyc/circuit.c @@ -235,7 +235,7 @@ void circuit_msg(string mc, mapping vars, string data) { if (tls_query_connection_state(ME) == 0) { array(string) targethosts = ({ }); foreach(string ho : vars["_list_targets_hosts"]) { - if (is_localhost(ho)) { + if (is_localhost(lower_case(ho))) { targethosts += ({ ho }); } } diff --git a/world/net/spyc/dispatch.i b/world/net/spyc/dispatch.i index b36737b..5749612 100644 --- a/world/net/spyc/dispatch.i +++ b/world/net/spyc/dispatch.i @@ -49,7 +49,7 @@ void dispatch(mixed header_vars, mixed varops, mixed method, mixed body) { DISPATCHERROR("target is not an uniform\n") } // FIXME relaying support here? - if (!is_localhost(u[UHost])) { + if (!is_localhost(local_host(u[UHost]))) { DISPATCHERROR("target is not configured on this server\n") } }