Skip to content

Commit

Permalink
Sync up with master
Browse files Browse the repository at this point in the history
  • Loading branch information
NuSkooler committed Jan 15, 2024
2 parents 0b1dee7 + f638ea8 commit 5e01a49
Show file tree
Hide file tree
Showing 16 changed files with 54 additions and 29 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
uses: docker/login-action@v2
Expand All @@ -31,5 +31,5 @@ jobs:
with:
tags: enigmabbs/enigma-bbs:latest
file: docker/Dockerfile
platforms: linux/amd64,linux/arm64
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
2 changes: 1 addition & 1 deletion LICENSE.TXT
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2015-2023, Bryan D. Ashby
Copyright (c) 2015-2024, Bryan D. Ashby
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ ENiGMA has been tested with many terminals. However, the following are suggested
## License
Released under the [BSD 2-clause](https://opensource.org/licenses/BSD-2-Clause) license:

Copyright (c) 2015-2023, Bryan D. Ashby
Copyright (c) 2015-2024, Bryan D. Ashby
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
Binary file modified art/themes/luciano_blocktronics/CONFSCR.ANS
Binary file not shown.
Binary file modified art/themes/luciano_blocktronics/NUA.ANS
Binary file not shown.
3 changes: 3 additions & 0 deletions core/color_codes.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ function ansiSgrFromCnetStyleColorCode(cc) {
}

function renegadeToAnsi(s, client) {
if (!s) {
return '';
}
if (-1 == s.indexOf('|')) {
return s; // no pipe codes present
}
Expand Down
2 changes: 1 addition & 1 deletion core/connect.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ function displayBanner(term) {
// note: intentional formatting:
term.pipeWrite(`
|06Connected to |02EN|10i|02GMA|10½ |06BBS version |12|VN
|06Copyright (c) 2014-2023 Bryan Ashby |14- |12http://l33t.codes/
|06Copyright (c) 2014-2024 Bryan Ashby |14- |12http://l33t.codes/
|06Updates & source |14- |12https://github.com/NuSkooler/enigma-bbs/
|00`);
}
Expand Down
2 changes: 1 addition & 1 deletion core/qwk_mail_packet.js
Original file line number Diff line number Diff line change
Expand Up @@ -1076,7 +1076,7 @@ class QWKPacketWriter extends EventEmitter {
}

// First block is a space padded ID
const id = `Created with ENiGMA 1/2 BBS v${enigmaVersion} Copyright (c) 2015-2023 Bryan Ashby`;
const id = `Created with ENiGMA 1/2 BBS v${enigmaVersion} Copyright (c) 2015-2024 Bryan Ashby`;
this.messagesStream.write(
id.padEnd(QWKMessageBlockSize, ' '),
'ascii'
Expand Down
4 changes: 4 additions & 0 deletions core/string_util.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ const SIMPLE_ELITE_MAP = {
};

function stylizeString(s, style) {
if (!s) {
return '';
}

var len = s.length;
var c;
var i;
Expand Down
6 changes: 5 additions & 1 deletion core/text_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,11 @@ TextView.prototype.setText = function (text, redraw) {

if (!_.isString(text)) {
// allow |text| to be numbers/etc.
text = text.toString();
if (_.isUndefined(text) || null === text) {
text = '';
} else {
text = text.toString();
}
}

const formatObj = getPredefinedMCIFormatObject(this.client, text);
Expand Down
37 changes: 25 additions & 12 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
FROM node:18-buster-slim
FROM --platform=${BUILDPLATFORM:-linux/amd64} node:20-bookworm-slim

ARG TARGETPLATFORM
ARG BUILDPLATFORM
ARG TARGETOS
ARG TARGETBRANCH

LABEL maintainer="[email protected]"

ENV NVM_DIR /root/.nvm
ENV DEBIAN_FRONTEND noninteractive
COPY . /enigma-bbs

# Do some installing! (and alot of cleaning up) keeping it in one step for less docker layers
# - if you need to debug i recommend to break the steps with individual RUNs)

# Just copy the package.json so it only needs to build once
COPY package.json /enigma-bbs/

# Install APT and NPM packages
RUN apt-get update \
&& apt-get install -y \
git \
curl \
build-essential \
python \
python3 \
libssl-dev \
lrzsz \
Expand All @@ -22,26 +28,33 @@ RUN apt-get update \
unrar-free \
p7zip-full \
dos2unix \
&& npm set progress=false && npm config set depth 0 \
&& npm install -g npm@latest \
&& npm install -g pm2 \
&& cd /enigma-bbs && npm install \
&& cd /enigma-bbs && npm install


# Do this after npm install to avoid cache-miss on every code change
COPY . /enigma-bbs

# Then run post source copy steps that have to happen every time
RUN dos2unix /enigma-bbs/docker/bin/docker-entrypoint.sh \
&& apt-get remove dos2unix -y \
&& chmod +x /enigma-bbs/docker/bin/docker-entrypoint.sh \
&& cp -f /enigma-bbs/docker/bin/sexyz /usr/local/bin \
&& cd /enigma-bbs \
&& pm2 start main.js \
&& mkdir -p /enigma-bbs-pre/art \
&& mkdir /enigma-bbs-pre/mods \
&& mkdir /enigma-bbs-pre/config \
&& cp -rp art/* ../enigma-bbs-pre/art/ \
&& cp -rp mods/* ../enigma-bbs-pre/mods/ \
&& cp -rp config/* ../enigma-bbs-pre/config/ \
&& apt-get remove build-essential python python3 libssl-dev git curl -y \
&& apt-get remove build-essential python3 libssl-dev git curl -y \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& apt-get clean

# sexyz
COPY docker/bin/sexyz /usr/local/bin
RUN dos2unix /enigma-bbs/docker/bin/docker-entrypoint.sh && apt-get remove dos2unix -y
RUN chmod +x /enigma-bbs/docker/bin/docker-entrypoint.sh

# enigma storage mounts
VOLUME /enigma-bbs/art
VOLUME /enigma-bbs/config
Expand Down
4 changes: 2 additions & 2 deletions docs/_docs/admin/administration.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ Monitor your system via the [Waiting For Caller (WFC)](../modding/wfc.md) screen
User management is currently handled via the [oputil CLI](oputil.md).

## Backing Up Your System
It is *highly* recommended to perform **regular backups** of your system. Nothing is worse than spending a lot of time setting up a system only to have to go away unexpectedly!
It is *highly* recommended to perform **regular backups** of your system. Nothing is worse than spending a lot of time setting up a system only to have it go away unexpectedly!

In general, simply creating a copy/archive of your system is enough for the default configuration. If you have changed default paths to point outside of your main ENiGMA½ installation take special care to ensure these are preserved as well. Database files may be in a state of flux when simply copying files. See [Database Backups](#database-backups) below for details on consistent backups.
In general, simply creating a copy/archive of your system is enough for the default configuration. If you have changed default paths to point outside of your main ENiGMA½ installation, take special care to ensure these are preserved as well. Database files may be in a state of flux when simply copying files. See [Database Backups](#database-backups) below for details on consistent backups.

### Database Backups
[SQLite's CLI backup command](https://sqlite.org/cli.html#special_commands_to_sqlite3_dot_commands_) can be used for creating database backup files. This can be performed as an additional step to a full backup to ensure the database is backed up in a consistent state (whereas simply copying the files does not make any guarantees).
Expand Down
2 changes: 1 addition & 1 deletion docs/_docs/admin/oputil.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Commands break up operations by groups:

Global arguments apply to most commands and actions:
* `--config`: Specify configuration directory if it is not the default of `./config/`.
* `--no-prompt`: Assume defaults and do not prompt when posisible.
* `--no-prompt`: Assume defaults and do not prompt when possible.

Type `./oputil.js <command> --help` for additional help on a particular command. The following sections will describe them.

Expand Down
6 changes: 3 additions & 3 deletions docs/_docs/installation/hardware/rpi.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ to get it written to an SD card.
2. Enable SSH (option 5, option P2)
3. Expand the filesystem to use the entire SD card (option 7, option A1)

3. Update & upgrade all packages: `apt-get update && apt-get upgrade`
3. Update & upgrade all packages: `sudo apt-get update && sudo apt-get upgrade`

4. Install required packages: `sudo apt install lrzsz p7zip-full`
4. Install required packages: `sudo apt install git lrzsz p7zip-full`

5. Follow the [installation instructions](../installation/) to install ENiGMA½.
5. Follow the [installation instructions](../install-script.html) to install ENiGMA½.

6. Profit!
2 changes: 1 addition & 1 deletion docs/_docs/installation/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ _Note that if you've used the [Docker](docker.md) installation method, you've al
If everything went OK:

```text
ENiGMA½ Copyright (c) 2014-2023, Bryan Ashby
ENiGMA½ Copyright (c) 2014-2024, Bryan Ashby
_____________________ _____ ____________________ __________\_ /
\__ ____/\_ ____ \ /____/ / _____ __ \ / ______/ // /___jp!
// __|___// | \// |// | \// | | \// \ /___ /_____
Expand Down
3 changes: 2 additions & 1 deletion docs/_docs/modding/wfc.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The system allows any user with the proper security to access the WFC / system o
Adding your user to the `wfc` group:
```bash
# Repalce USERNAME with your leet +op username
# Replace USERNAME with your leet +op username
./oputil.js user group USERNAME "+wfc"
```

Expand All @@ -43,6 +43,7 @@ mainMenuWaitingForCaller: {
## Configuration
### Config Block
The WFC `config` block allows for the following keys:

| Key | Required | Description |
|-----|----------|-------------|
| `acs` | :+1: | See [Security](#security) above. |
Expand Down

0 comments on commit 5e01a49

Please sign in to comment.