Skip to content

Commit 65b0721

Browse files
committed
v7.0.1 - fix #34
1 parent 52fda61 commit 65b0721

File tree

6 files changed

+12
-6
lines changed

6 files changed

+12
-6
lines changed

JavascriptServer/config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,10 @@ const common_config = {
141141
kick_other_sessions: true
142142
},
143143

144+
chat: {
145+
create_global_chat: true
146+
},
147+
144148
tps: 20, // tickrate
145149

146150
// Disable some of the features that you don't need in your game

JavascriptServer/initializers/15_chats.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@ import Chat from "#concepts/chat";
22
import ChatLog from "#schemas/chat";
33

44
// create instances of every chat from the DB
5-
const chatLogs = await ChatLog.find({});
6-
chatLogs.forEach(chatlog => {
7-
let chat = new Chat(chatlog);
8-
global.chats[chat.chat_id] = chat;
9-
});
5+
if (global.config.db_enabled) {
6+
const chatLogs = await ChatLog.find({});
7+
chatLogs.forEach(chatlog => {
8+
let chat = new Chat(chatlog);
9+
global.chats[chat.chat_id] = chat;
10+
});
11+
}
1012

1113

1214
// create a new id=0 "global" chat if it doesn't exist already
13-
if (global.chats['0'] === undefined) {
15+
if (global.chats['0'] === undefined && global.config.chat.create_global_chat) {
1416
let chatlog = new ChatLog();
1517
chatlog._id = '0';
1618

Release/GMClient.zip

1 Byte
Binary file not shown.

Release/JSServer.zip

57 Bytes
Binary file not shown.

Release/TSServer.zip

58 Bytes
Binary file not shown.

Release/Warp.yymps

1 Byte
Binary file not shown.

0 commit comments

Comments
 (0)