new /set loginhistory <amount>

This commit is contained in:
psyc://loupsycedyglgamf.onion/~lynX 2018-04-24 15:43:14 +02:00
parent 9e02ba080c
commit 04a4908877
10 changed files with 35 additions and 3 deletions

View File

@ -1,2 +1,4 @@
#define PLACE_HISTORY_EXPORT
#define PLACE_SCRATCHPAD
#define SECURE
#include <place.gen>

9
place/git.c Normal file
View File

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

View File

@ -722,6 +722,11 @@ _PAGES_help_settings
|Mit "<b>/set filter off</b>" kann der private Firewall wieder abgeschaltet
|werden. "<b>default</b>" geht auf die Voreinstellung zurück.
|
|<a name="loginhistory"></a>
|<DT><P><B> /set loginhistory &lt;Anzahl&gt;</B></p><dd>
|taugt zur Einschränkung wieviele Nachrichten aus der Historie vergangener
|öffentlicher Nachrichten beim Einloggvorgang dargestellt werden.
|
|<a name="presencefilter"></a>
|<DT><P><B> /set presencefilter [ on | off | all | automatic ] </B></p><dd>
|hilft die Menge an Anwesenheit- und Abwesenheitsbekundungen in Zaum zu

View File

@ -203,6 +203,11 @@ _PAGES_help_display
|wait to meet you in a room. "<b>default</b>" resets this value to
|the local default.
|
|<a name="loginhistory"></a>
|<DT><P><B> /set loginhistory &lt;amount&gt;</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>
|{_HTML_info_split}
|<dl>

View File

@ -897,7 +897,7 @@ logon() {
// version strings, only IRC makes it terribly complicated and
// even political. oh of course, that's because on irc the server
// 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
return rc;

View File

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

View File

@ -166,6 +166,7 @@ volatile mapping psyc2set = ([
"_address_street" : "street",
"_address_zone_time" : "timezone",
"_affiliation" : "affiliation",
"_amount_history_login" : "loginhistory",
"_character_action" : "actioncharacter",
"_character_command" : "commandcharacter",
"_color" : "color",
@ -288,6 +289,7 @@ volatile mapping set2psyc = ([
"street" : "_address_street",
"timezone" : "_address_zone_time",
"affiliation" : "_affiliation",
"loginhistory" : "_amount_history_login",
"actioncharacter" : "_character_action",
"commandcharacter" : "_character_command",
"color" : "_color",

View File

@ -21,7 +21,7 @@ while (<main::DATA>) {
$_ = $psyc = $1;
$psyc{$psyc} = 1;
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/_description/_text/g;
s/_favorite/_fave/g;
@ -633,6 +633,9 @@ jProf places_lived
PSYC _place_home
set home
PSYC _amount_history_login
#set loginhistory
PSYC _flag_filter_strangers
set filter

View File

@ -1724,7 +1724,8 @@ autojoin() {
// says it, too.
# endif
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
// subscriptions are stored in lowercase, warum auch immer
if (sizeof(v("subscriptions"))) {

View File

@ -2745,6 +2745,10 @@ checkVar(key, value) {
if (value == "off" || value == "-") value = "-";
else if (value) value = "on";
break;
case "loginhistory":
// zero is an intentional value in this case
if (value == "0") break;
// fall through
case "postalcode": // integer settings
case "latitude":
case "longitude":