Compare commits

..

No commits in common. "61af290780071085dd3ca1211a5076409d5c5270" and "69afb24f63eb7f27f31a8502522eef2c5c2ee11d" have entirely different histories.

3 changed files with 9 additions and 15 deletions

4
package-lock.json generated
View File

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

View File

@ -1,6 +1,6 @@
{
"name": "schat2-clive",
"version": "1.9.2",
"version": "1.9.1",
"description": "Game host for SChat 2-powered chat sites",
"main": "src/app.js",
"scripts": {

View File

@ -1,18 +1,12 @@
'use strict';
const config = require('config');
function onCommand(args, context) {
if (config.platform === 'schat') {
context.sendMessage('Shutting down... :sleeping:', context.room?.id, { type: 'message', label: false }, context.message.user?.username);
}
if (config.platform === 'irc' && context.room.id === config.user.nick) {
// if the room ID is the bot's own nickname, it's a PM and we should reply to the sender
context.sendMessage('Shutting down... 😴', context.user.id, { label: false });
} else if (config.platform === 'irc') {
context.sendMessage('Shutting down... 😴', context.room?.id, { type: 'message', label: false });
}
context.bot.socket.transmit('message', {
roomId: context.room?.id,
recipient: context.message.user?.username,
body: 'Shutting down... :sleeping:',
style: config.style,
});
context.logger.info(`Kill command used by ${context.user.username}`);