Skip to content

Commit

Permalink
update year
Browse files Browse the repository at this point in the history
  • Loading branch information
sblendorio committed May 21, 2023
1 parent fe1758b commit e7be3e2
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 21 deletions.
7 changes: 6 additions & 1 deletion src/main/java/eu/sblendorio/bbs/core/BbsThread.java
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,11 @@ public void log(String message) {
}

public static char chr(int code) { return (char) code; }
public int keyPressed() throws IOException { return io.keyPressed(); }
public int keyPressed() throws IOException {
int ch = io.keyPressed();
if (ch >= 0) restartKeepAlive();
return ch;
}
public boolean isKeyPressed() throws IOException { return io.keyPressed() != -1; }
public void write(byte[] buf, int off, int len) {
boolean savedKeepAlive = getRoot().keepAlive;
Expand Down Expand Up @@ -647,6 +651,7 @@ public int keyPressed(long timeout) throws IOException {
e.printStackTrace();
}
}
if (ch >= 0) restartKeepAlive();
return ch;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,9 @@ private boolean authenticate() throws IOException {
println("Functionality reserved to Patrons");
println("https://patron.com/FrancescoSblendorio");
println();
println("Your Patreon email ('-' for underscore):");
println("Your Patreon email ('-' for underscore)");
// println(" you can use ! instead of @, example:");
// println(" johndoe!gmail.com");
print(">");
flush(); resetInput();
String tempEmail = readLine();
Expand Down
8 changes: 3 additions & 5 deletions src/main/java/eu/sblendorio/bbs/tenants/ascii/MenuApple1.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.LinkedList;
import java.util.List;
import java.util.Scanner;
import java.util.*;

import org.apache.commons.lang3.StringUtils;

Expand Down Expand Up @@ -96,13 +94,13 @@ public void logo() throws Exception {
public String rssPropertyTimeoutDefault() { return "40000"; }

protected void banner() {
println("BBS for Apple-1 - by F. Sblendorio 2023");
println("BBS for Apple-1 - by F. Sblendorio " + Calendar.getInstance().get(Calendar.YEAR));
println();
}

@Override
public void doLoop() throws Exception {
if (alternateLogo()) { println();println();println("Moved to BBS.RETROCAMPUS.COM");println(); return; }
if (alternateLogo()) { println();println();println("Moved to BBS.RETROCAMPUS.COM");println(); keyPressed(10_000); return; }

init();
logo();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import static eu.sblendorio.bbs.core.Utils.STR_ALPHANUMERIC;
import static eu.sblendorio.bbs.core.Utils.setOfChars;
import java.io.IOException;
import java.util.Calendar;

public class MenuApple1M10 extends MenuApple1 {

Expand All @@ -24,7 +25,7 @@ public void initBbs() throws Exception {

@Override
protected void banner() {
println("BBS for M10 - by F. Sblendorio 2023");
println("BBS for M10 - by F. Sblendorio " + Calendar.getInstance().get(Calendar.YEAR));
newline();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package eu.sblendorio.bbs.tenants.ascii;

import java.util.Calendar;

import static java.nio.charset.StandardCharsets.ISO_8859_1;

public class MenuApple1Telnet extends MenuApple1 {
Expand All @@ -24,7 +26,7 @@ public void initBbs() throws Exception {

@Override
protected void banner() {
println("Retrocampus BBS for UNIX Telnet - by F. Sblendorio 2023");
println("Retrocampus BBS for UNIX Telnet - by F. Sblendorio " + Calendar.getInstance().get(Calendar.YEAR));
newline();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public void initBbs() throws Exception {

@Override
public void doLoop() throws Exception {
if (alternateLogo()) { println();println();println("Moved to BBS.RETROCAMPUS.COM");println(); return; }
if (alternateLogo()) { println();println();println("Moved to BBS.RETROCAMPUS.COM");println(); keyPressed(10_000); return; }
int ch;
String banner = (alternateLogo() ? "RETROACADEMY" : "RETROCAMPUS") + " BBS";
write(12);
Expand Down
19 changes: 11 additions & 8 deletions src/main/java/eu/sblendorio/bbs/tenants/petscii/Menu64.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@

import java.io.File;
import java.io.FileNotFoundException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Path;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.Scanner;
import java.util.*;
import java.util.stream.Collectors;

import static eu.sblendorio.bbs.core.PetsciiKeys.*;
Expand Down Expand Up @@ -83,16 +81,21 @@ public void init() {

@Override
public void doLoop() throws Exception {
if (alternateLogo()) { println();println();println("Moved to BBS.RETROCAMPUS.COM");println(); return; }
if (alternateLogo()) { write(PetsciiKeys.LOWERCASE); println();println();println("Moved to BBS.RETROCAMPUS.COM");println(); keyPressed(10_000); return; }

init();
while (true) {
write(CLR, LOWERCASE, CASE_LOCK, HOME);
log("Starting Main Menu BBS");
write(readBinaryFile(
byte[] logoseq = readBinaryFile(
alternateLogo()
? "petscii/bbs-menu-main-alternate.seq"
: "petscii/bbs-menu-main.seq"));
? "petscii/bbs-menu-main-alternate.seq"
: "petscii/bbs-menu-main.seq");
String currentYear = String.valueOf(Calendar.getInstance().get(Calendar.YEAR));
logoseq = new String(logoseq, StandardCharsets.ISO_8859_1)
.replace("9999", currentYear)
.getBytes(StandardCharsets.ISO_8859_1);
write(logoseq);
write(HOME);
drawLogo();
write(GREY3);
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/petscii/about.petmate

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/main/resources/petscii/bbs-menu-main.seq
Original file line number Diff line number Diff line change
@@ -1 +1 @@
������ ����EWS��������EWS������AMES���ILES�� �   ����* �* ���ݞ � ������ ��� ݍ �   ���� �*  ���ݞ� ����� � �� ݍ �   ����* �* ���ݞ ����� ��� ��� ݍ �   ���� ���ݞ� ��������� ��ݍ �   ���� ���ݞ� ������������ݍ � �TALIAN �� �NGLISH �ݞ� � ���� �� ݍ �� � � �1�� ��� � � �2�� ��� �3�� ��� �4�� ݍ ������������������������������������� ������������������������������������� ݗ � �� �NTERNET �� �ISC� ���� ݍ ݗ�� �� �ݟ� � � � � � � � � � � � ��� ����ݍ ݗ ��� � �5���HAT ���ǒ��ALLERY�� � ��� � ���ݍ ݗ ��� � �6���ESSAGES ���̒��E OSSA�� � ��� � ���ݍ ݗ�� ��7���ROWSER ���ؒ��BOUT�� � � � �������ݍ ݗ� � ��8���LIZA �� ݍ �� � � �9���HAT��� �������ATRONS ݍ � ���’��ATRONS �OGO ݍ �� � � �ْ��IFI �ODEM�� ݍ ������������������������������������� BY �.�BLENDORIO 2018-2023� �  . � �XIT�
������ ����EWS��������EWS������AMES���ILES�� �   ����* �* ���ݞ � ������ ��� ݍ �   ���� �*  ���ݞ� ����� � �� ݍ �   ����* �* ���ݞ ����� ��� ��� ݍ �   ���� ���ݞ� ��������� ��ݍ �   ���� ���ݞ� ������������ݍ � �TALIAN �� �NGLISH �ݞ� � ���� �� ݍ �� � � �1�� ��� � � �2�� ��� �3�� ��� �4�� ݍ ������������������������������������� ������������������������������������� ݗ � �� �NTERNET �� �ISC� ���� ݍ ݗ�� �� �ݟ� � � � � � � � � � � � ��� ����ݍ ݗ ��� � �5���HAT ���ǒ��ALLERY�� � ��� � ���ݍ ݗ ��� � �6���ESSAGES ���̒��E OSSA�� � ��� � ���ݍ ݗ�� ��7���ROWSER ���ؒ��BOUT�� � � � �������ݍ ݗ� � ��8���LIZA �� ݍ �� � � �9���HAT��� �������ATRONS ݍ � ���’��ATRONS �OGO ݍ �� � � �ْ��IFI �ODEM�� ݍ ������������������������������������� BY �.�BLENDORIO 2018-9999� �  . � �XIT�
2 changes: 1 addition & 1 deletion src/main/resources/petscii/rs232modem.seq
Original file line number Diff line number Diff line change
@@ -1 +1 @@
����� �NCE UPON A TIME, THERE WHERE DIAL� UP ���. �ODAY WE HAVE �NTERNET BUT� WE CAN RECREATE SUCH AN EXPERIENCE��� WWW.MUSEO-COMPUTER.IT/EN/WIFI-MODEM������ � � � ��������������������� � �������������� ���� �ET HERE YOUR BRAND�� �������� ���������� NEW �I�I MODEM�, IT��� � � � ������������������� USES YOUR �NTERNET��� � � � � ������ ������������ CONNECTION TO ALLOW��� � � � �������������������� YOU TO TELNET ���ES�� � ������� ��������� AROUND THE WORLD.��� � � �  ���������� ������� !��� � � � � ��� ��� ��� ����� ! �������� � � �  ������������������� ! � ����������� � � � ���������� ���� ��� !� �  ��� �� ����� � � � ������� �� ������� !� � � �  ������� � ���������������� !� � � �  ������� �������������������_��� � � �  �������� � � � ������������ ����� ������
����� �NCE UPON A TIME, THERE WHERE DIAL� UP ���. �ODAY WE HAVE �NTERNET BUT� WE CAN RECREATE SUCH AN EXPERIENCE��� WWW.MUSEO-COMPUTER.IT/EN/WIFI-MODEM������ � � � ��������������������� � �������������� ���� �ET HERE YOUR BRAND�� �������� ���������� NEW �I�I MODEM�, IT��� � � � ������������������� USES YOUR �NTERNET��� � � � � ������ ������������ CONNECTION TO ALLOW��� � � � �������������������� YOU TO TELNET ���ES�� � ������� ��������� AROUND THE WORLD.��� � � �  ���������� ������� ݍ�� � � � � ��� ��� ��� ����� ! �������� � � �  �������������������  � ����������� � � � ���������� ���� ��� !� �  ��� �� ����� � � � ������� �� ������� � � � �  ������� � ���������������� !� � � �  ������� �������������������_��� � � �  �������� � � � ������������ ����� ������

0 comments on commit e7be3e2

Please sign in to comment.