Merge branch 'master' of git://git.psyced.org/git/psyced

This commit is contained in:
Gabor Adam Toth 2010-02-26 22:12:58 +01:00
commit 5278a47e85
9 changed files with 13 additions and 9 deletions

View File

@ -3992,6 +3992,9 @@ jabber/active
smtp/outgoing, smtp/user
+ implementation of outgoing mail queue
=== 201002 ============================================================
*
- in many spots is_localhost() was being called
with hostnames that have not been lowercased. oops!?
person, user
+ allow multiple psyc clients per user, thx tg
usercmd

View File

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

View File

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

View File

@ -2527,7 +2527,7 @@ logon(host) {
&& mode[PPL_NOTIFY] >= PPL_NOTIFY_FRIEND) continue;
if (u = parse_uniform(ni)) {
// <lynX> 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 {

View File

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

View File

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

View File

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

View File

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

View File

@ -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(lower_case(u[UHost]))) {
DISPATCHERROR("target is not configured on this server\n")
}
}