Compare commits

..

No commits in common. "7640fae9d8ddf6dbc113c267ccd4dcfb7df05ea9" and "276547cecb0c26194ab6b94373ec419778537dda" have entirely different histories.

3 changed files with 7 additions and 7 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "schat2-clive", "name": "schat2-clive",
"version": "1.5.11", "version": "1.5.10",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "schat2-clive", "name": "schat2-clive",
"version": "1.5.11", "version": "1.5.10",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"bhttp": "^1.2.8", "bhttp": "^1.2.8",

View File

@ -1,6 +1,6 @@
{ {
"name": "schat2-clive", "name": "schat2-clive",
"version": "1.5.11", "version": "1.5.10",
"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": {

View File

@ -2,14 +2,14 @@
const config = require('config'); const config = require('config');
function onCommand(args, context) { function onCommand([rawRoomName, ...words], context) {
if (!config.operators?.includes(context.user.username)) { if (!config.operators?.includes(context.user.username)) {
return; return;
} }
const message = context.room ? args.join(' ') : args.slice(1).join(' '); const roomName = rawRoomName.replace(/#+/, '');
const roomName = args[0].replace(/#+/, ''); const message = words.join(' ');
const room = context.room || Object.values(context.bot.rooms).find((botRoom) => botRoom.name === roomName); const room = Object.values(context.bot.rooms).find((botRoom) => botRoom.name === roomName);
if (!room) { if (!room) {
return; return;