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