mirror of git://git.psyced.org/git/psyced
Merge remote-tracking branch 'fly/master'
This commit is contained in:
commit
4f7fb2cebe
|
@ -1,2 +1,4 @@
|
||||||
#define PLACE_HISTORY_EXPORT
|
#define PLACE_HISTORY_EXPORT
|
||||||
|
#define PLACE_SCRATCHPAD
|
||||||
|
#define SECURE
|
||||||
#include <place.gen>
|
#include <place.gen>
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
#include <net.h>
|
||||||
|
#define NAME "git"
|
||||||
|
|
||||||
|
//#ifdef BRAIN
|
||||||
|
# define REDIRECT "psyc://psyced.org/@PSYC"
|
||||||
|
//#endif
|
||||||
|
|
||||||
|
#include <place.gen> // now generate the place according to the rules
|
||||||
|
|
|
@ -722,6 +722,11 @@ _PAGES_help_settings
|
||||||
|Mit "<b>/set filter off</b>" kann der private Firewall wieder abgeschaltet
|
|Mit "<b>/set filter off</b>" kann der private Firewall wieder abgeschaltet
|
||||||
|werden. "<b>default</b>" geht auf die Voreinstellung zurück.
|
|werden. "<b>default</b>" geht auf die Voreinstellung zurück.
|
||||||
|
|
|
|
||||||
|
|<a name="loginhistory"></a>
|
||||||
|
|<DT><P><B> /set loginhistory <Anzahl></B></p><dd>
|
||||||
|
|taugt zur Einschränkung wieviele Nachrichten aus der Historie vergangener
|
||||||
|
|öffentlicher Nachrichten beim Einloggvorgang dargestellt werden.
|
||||||
|
|
|
||||||
|<a name="presencefilter"></a>
|
|<a name="presencefilter"></a>
|
||||||
|<DT><P><B> /set presencefilter [ on | off | all | automatic ] </B></p><dd>
|
|<DT><P><B> /set presencefilter [ on | off | all | automatic ] </B></p><dd>
|
||||||
|hilft die Menge an Anwesenheit- und Abwesenheitsbekundungen in Zaum zu
|
|hilft die Menge an Anwesenheit- und Abwesenheitsbekundungen in Zaum zu
|
||||||
|
|
|
@ -203,6 +203,11 @@ _PAGES_help_display
|
||||||
|wait to meet you in a room. "<b>default</b>" resets this value to
|
|wait to meet you in a room. "<b>default</b>" resets this value to
|
||||||
|the local default.
|
|the local default.
|
||||||
|
|
|
|
||||||
|
|<a name="loginhistory"></a>
|
||||||
|
|<DT><P><B> /set loginhistory <amount></B></p><dd>
|
||||||
|
|lets you define an upper limit in the number of history
|
||||||
|
|messages you want to see when logging into the server.
|
||||||
|
|
|
||||||
|</dl>
|
|</dl>
|
||||||
|{_HTML_info_split}
|
|{_HTML_info_split}
|
||||||
|<dl>
|
|<dl>
|
||||||
|
|
|
@ -261,29 +261,31 @@ runQ() {
|
||||||
}
|
}
|
||||||
|
|
||||||
connect(ho, po, transport, srv, extra) {
|
connect(ho, po, transport, srv, extra) {
|
||||||
|
#ifndef _flag_disable_network_circuit_connect
|
||||||
if (interactive()) return -8;
|
if (interactive()) return -8;
|
||||||
P3(("connect: %O, %O, %O, %O for %O\n", ho, po, transport, srv, ME))
|
P3(("connect: %O, %O, %O, %O for %O\n", ho, po, transport, srv, ME))
|
||||||
if (time() < time_of_connect_attempt + waitforme) return -2;
|
if (time() < time_of_connect_attempt + waitforme) return -2;
|
||||||
if (ho) { // paranoid: stringp(ho) && strlen(ho)) {
|
if (ho) { // paranoid: stringp(ho) && strlen(ho)) {
|
||||||
if (po) port = po;
|
if (po) port = po;
|
||||||
#ifndef ERQ_WITHOUT_SRV
|
# ifndef ERQ_WITHOUT_SRV
|
||||||
if (srv) {
|
if (srv) {
|
||||||
hostname = lower_case(ho);
|
hostname = lower_case(ho);
|
||||||
host = 0;
|
host = 0;
|
||||||
} else
|
} else
|
||||||
#endif
|
# endif
|
||||||
host = lower_case(ho);
|
host = lower_case(ho);
|
||||||
P2(("connect.%s:\t%O, %O, %O\t%O\n", srv || "to",
|
P2(("connect.%s:\t%O, %O, %O\t%O\n", srv || "to",
|
||||||
ho, po, transport, ME))
|
ho, po, transport, ME))
|
||||||
}
|
}
|
||||||
#ifndef ERQ_WITHOUT_SRV
|
# ifndef ERQ_WITHOUT_SRV
|
||||||
P4(("connect->srv_choose? depends on srv %O\n", srv))
|
P4(("connect->srv_choose? depends on srv %O\n", srv))
|
||||||
if (srv) return dns_srv_resolve(hostname, srv, // _psyc._tls.domain
|
if (srv) return dns_srv_resolve(hostname, srv, // _psyc._tls.domain
|
||||||
transport == "s" ? "tls" : "tcp", #'srv_choose,
|
transport == "s" ? "tls" : "tcp", #'srv_choose,
|
||||||
transport);
|
transport);
|
||||||
#endif
|
# endif
|
||||||
if (::connect(host, port, transport, extra) >= 0)
|
if (::connect(host, port, transport, extra) >= 0)
|
||||||
time_of_connect_attempt = time();
|
time_of_connect_attempt = time();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
disconnected(remaining) {
|
disconnected(remaining) {
|
||||||
|
|
|
@ -114,6 +114,7 @@ process_header() {
|
||||||
|
|
||||||
parse_request(input) {
|
parse_request(input) {
|
||||||
P0(("=== HTTP got: %O from %O\n", input, query_ip_name(ME)))
|
P0(("=== HTTP got: %O from %O\n", input, query_ip_name(ME)))
|
||||||
|
if (input == "HEAD / HTTP/1.1") return 1;
|
||||||
|
|
||||||
if (!input || input=="") {
|
if (!input || input=="") {
|
||||||
// should return error?
|
// should return error?
|
||||||
|
|
|
@ -53,7 +53,8 @@
|
||||||
# define DEFAULT_CONTENT_TYPE "text/html; charset=" SYSTEM_CHARSET
|
# define DEFAULT_CONTENT_TYPE "text/html; charset=" SYSTEM_CHARSET
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __EFUN_DEFINED__(idna_stringprep) && defined(DRIVER_PATH)
|
// 2018-05 tmp disabled stringprep:
|
||||||
|
#if __EFUN_DEFINED__(idna_stringprep) && defined(DRIVER_PATH) && !defined(_flag_disable_idna_stringprep)
|
||||||
// stringprep needs utf8 arguments
|
// stringprep needs utf8 arguments
|
||||||
// this results in lots of conversions some of which look like
|
// this results in lots of conversions some of which look like
|
||||||
// system->utf>system->utf. luckily UTF8 is our system charset.
|
// system->utf>system->utf. luckily UTF8 is our system charset.
|
||||||
|
@ -224,7 +225,10 @@
|
||||||
# define WANT_S2S_TLS
|
# define WANT_S2S_TLS
|
||||||
# define WANT_S2S_SASL
|
# define WANT_S2S_SASL
|
||||||
# define ENTER_MEMBERS
|
# define ENTER_MEMBERS
|
||||||
# define PERSISTENT_MASTERS
|
// disabled 2018-05 due to stringprep messing up the _routes
|
||||||
|
// data structures *and* plenty of karteileichen which means
|
||||||
|
// that clean-up of _routes is not working!!
|
||||||
|
//# define PERSISTENT_MASTERS
|
||||||
# define NEW_RENDER
|
# define NEW_RENDER
|
||||||
# define MUCSUC
|
# define MUCSUC
|
||||||
//# define XMPP_BIDI
|
//# define XMPP_BIDI
|
||||||
|
|
|
@ -897,7 +897,7 @@ logon() {
|
||||||
// version strings, only IRC makes it terribly complicated and
|
// version strings, only IRC makes it terribly complicated and
|
||||||
// even political. oh of course, that's because on irc the server
|
// even political. oh of course, that's because on irc the server
|
||||||
// admin isn't necessarily a person of your trusting.
|
// admin isn't necessarily a person of your trusting.
|
||||||
w("_request_version", 0, 0, SERVER_UNIFORM);
|
w("_request_version"); //, 0, 0, SERVER_UNIFORM);
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
return rc;
|
return rc;
|
||||||
|
|
|
@ -672,12 +672,13 @@ iq(XMLNode node) {
|
||||||
case "jabber:iq:roster":
|
case "jabber:iq:roster":
|
||||||
switch(node["@type"]) {
|
switch(node["@type"]) {
|
||||||
case "get":
|
case "get":
|
||||||
// TODO: this assumes that to is unset and the query is
|
// TODO: this assumes that 'to' is unset and the query is
|
||||||
// to itself
|
// to itself. we sometimes get here without a valid tag -
|
||||||
|
// what should we do then?
|
||||||
hasroster = 1;
|
hasroster = 1;
|
||||||
packet = sprintf("<iq type='result' to='%s' id='%s'>"
|
packet = sprintf("<iq type='result' to='%s' id='%s'>"
|
||||||
"<query xmlns='jabber:iq:roster'>",
|
"<query xmlns='jabber:iq:roster'>",
|
||||||
myjid, tag);
|
myjid, stringp(tag)? tag: "");
|
||||||
// TODO: listAcq does the same basically
|
// TODO: listAcq does the same basically
|
||||||
foreach (friend : ppl) {
|
foreach (friend : ppl) {
|
||||||
mixed *u;
|
mixed *u;
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
<tr><td>_address_street</td><td>street</td><td>street</td><td>STREET</td><td>ADR/STREET</td><td>street</td><td></td></tr>
|
<tr><td>_address_street</td><td>street</td><td>street</td><td>STREET</td><td>ADR/STREET</td><td>street</td><td></td></tr>
|
||||||
<tr><td>_address_zone_time</td><td>timezone</td><td></td><td>TZ</td><td>TZ</td><td></td><td></td></tr>
|
<tr><td>_address_zone_time</td><td>timezone</td><td></td><td>TZ</td><td>TZ</td><td></td><td></td></tr>
|
||||||
<tr><td>_affiliation</td><td>affiliation</td><td>org_name</td><td>ORGNAME</td><td>ORG/ORGNAME</td><td>o</td><td></td></tr>
|
<tr><td>_affiliation</td><td>affiliation</td><td>org_name</td><td>ORGNAME</td><td>ORG/ORGNAME</td><td>o</td><td></td></tr>
|
||||||
|
<tr><td>_amount_history_login</td><td>loginhistory</td><td></td><td></td><td></td><td></td><td></td></tr>
|
||||||
<tr><td>_character_action</td><td>actioncharacter</td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>_character_action</td><td>actioncharacter</td><td></td><td></td><td></td><td></td><td></td></tr>
|
||||||
<tr><td>_character_command</td><td>commandcharacter</td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>_character_command</td><td>commandcharacter</td><td></td><td></td><td></td><td></td><td></td></tr>
|
||||||
<tr><td>_color</td><td>color</td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>_color</td><td>color</td><td></td><td></td><td></td><td></td><td></td></tr>
|
||||||
|
|
|
@ -166,6 +166,7 @@ volatile mapping psyc2set = ([
|
||||||
"_address_street" : "street",
|
"_address_street" : "street",
|
||||||
"_address_zone_time" : "timezone",
|
"_address_zone_time" : "timezone",
|
||||||
"_affiliation" : "affiliation",
|
"_affiliation" : "affiliation",
|
||||||
|
"_amount_history_login" : "loginhistory",
|
||||||
"_character_action" : "actioncharacter",
|
"_character_action" : "actioncharacter",
|
||||||
"_character_command" : "commandcharacter",
|
"_character_command" : "commandcharacter",
|
||||||
"_color" : "color",
|
"_color" : "color",
|
||||||
|
@ -288,6 +289,7 @@ volatile mapping set2psyc = ([
|
||||||
"street" : "_address_street",
|
"street" : "_address_street",
|
||||||
"timezone" : "_address_zone_time",
|
"timezone" : "_address_zone_time",
|
||||||
"affiliation" : "_affiliation",
|
"affiliation" : "_affiliation",
|
||||||
|
"loginhistory" : "_amount_history_login",
|
||||||
"actioncharacter" : "_character_action",
|
"actioncharacter" : "_character_action",
|
||||||
"commandcharacter" : "_character_command",
|
"commandcharacter" : "_character_command",
|
||||||
"color" : "_color",
|
"color" : "_color",
|
||||||
|
|
|
@ -21,7 +21,7 @@ while (<main::DATA>) {
|
||||||
$_ = $psyc = $1;
|
$_ = $psyc = $1;
|
||||||
$psyc{$psyc} = 1;
|
$psyc{$psyc} = 1;
|
||||||
next if /^_INTERNAL/;
|
next if /^_INTERNAL/;
|
||||||
s/_(address|contact|voice|scheme|source|flag|person|select)//g;
|
s/_(address|amount|contact|voice|scheme|source|flag|person|select)//g;
|
||||||
s/_date/_day/g;
|
s/_date/_day/g;
|
||||||
s/_description/_text/g;
|
s/_description/_text/g;
|
||||||
s/_favorite/_fave/g;
|
s/_favorite/_fave/g;
|
||||||
|
@ -633,6 +633,9 @@ jProf places_lived
|
||||||
PSYC _place_home
|
PSYC _place_home
|
||||||
set home
|
set home
|
||||||
|
|
||||||
|
PSYC _amount_history_login
|
||||||
|
#set loginhistory
|
||||||
|
|
||||||
PSYC _flag_filter_strangers
|
PSYC _flag_filter_strangers
|
||||||
set filter
|
set filter
|
||||||
|
|
||||||
|
|
|
@ -1728,7 +1728,8 @@ autojoin() {
|
||||||
// says it, too.
|
// says it, too.
|
||||||
# endif
|
# endif
|
||||||
teleport(v("place"), "_login", 0, 0, ([ "_amount_history":
|
teleport(v("place"), "_login", 0, 0, ([ "_amount_history":
|
||||||
_limit_amount_history_place_default ]));
|
v("loginhistory") ? to_int(v("loginhistory"))
|
||||||
|
: _limit_amount_history_place_default ]));
|
||||||
# endif
|
# endif
|
||||||
// subscriptions are stored in lowercase, warum auch immer
|
// subscriptions are stored in lowercase, warum auch immer
|
||||||
if (sizeof(v("subscriptions"))) {
|
if (sizeof(v("subscriptions"))) {
|
||||||
|
@ -1780,7 +1781,7 @@ quit(immediate, variant) {
|
||||||
int stayinalive = 0;
|
int stayinalive = 0;
|
||||||
|
|
||||||
// so, SUBSCRIBE_PERMANENT won't work for now.
|
// so, SUBSCRIBE_PERMANENT won't work for now.
|
||||||
if (sizeof(v("subscriptions")) && widthof(v("subscriptions"))) {
|
if (mappingp(v("subscriptions")) && sizeof(v("subscriptions")) && widthof(v("subscriptions"))) {
|
||||||
foreach (o, s : places) {
|
foreach (o, s : places) {
|
||||||
P3(("Stay in %O, %O?\n", o, s))
|
P3(("Stay in %O, %O?\n", o, s))
|
||||||
if (v("subscriptions")[lower_case(s)] != SUBSCRIBE_PERMANENT)
|
if (v("subscriptions")[lower_case(s)] != SUBSCRIBE_PERMANENT)
|
||||||
|
|
|
@ -2745,6 +2745,10 @@ checkVar(key, value) {
|
||||||
if (value == "off" || value == "-") value = "-";
|
if (value == "off" || value == "-") value = "-";
|
||||||
else if (value) value = "on";
|
else if (value) value = "on";
|
||||||
break;
|
break;
|
||||||
|
case "loginhistory":
|
||||||
|
// zero is an intentional value in this case
|
||||||
|
if (value == "0") break;
|
||||||
|
// fall through
|
||||||
case "postalcode": // integer settings
|
case "postalcode": // integer settings
|
||||||
case "latitude":
|
case "latitude":
|
||||||
case "longitude":
|
case "longitude":
|
||||||
|
|
Loading…
Reference in New Issue