Compare commits
2 Commits
867354978d
...
b8898d3fa3
Author | SHA1 | Date |
---|---|---|
|
b8898d3fa3 | |
|
11225c7aa6 |
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "schat2-clive",
|
||||
"version": "1.4.4",
|
||||
"version": "1.4.5",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "schat2-clive",
|
||||
"version": "1.4.4",
|
||||
"version": "1.4.5",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"bhttp": "^1.2.8",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "schat2-clive",
|
||||
"version": "1.4.4",
|
||||
"version": "1.4.5",
|
||||
"description": "Game host for SChat 2-powered chat sites",
|
||||
"main": "src/app.js",
|
||||
"scripts": {
|
||||
|
|
|
@ -9,6 +9,8 @@ const logger = require('simple-node-logger').createSimpleLogger();
|
|||
|
||||
const points = {};
|
||||
|
||||
logger.setLevel('debug');
|
||||
|
||||
async function auth() {
|
||||
const httpSession = bhttp.session();
|
||||
const username = config.uniqueUsername ? `${config.user.username}-${new Date().getTime().toString().slice(-5)}` : config.user.username;
|
||||
|
@ -255,6 +257,8 @@ async function connect(wsCreds, sessionCookie, bot, games) {
|
|||
socket.ws.on('message', async (msg) => {
|
||||
const [domain, data] = JSON.parse(msg);
|
||||
|
||||
logger.debug(`Received ${domain}: ${JSON.stringify(data)}`);
|
||||
|
||||
if (messageHandlers[domain]) {
|
||||
try {
|
||||
await messageHandlers[domain](data, bot, games);
|
||||
|
|
Loading…
Reference in New Issue