Compare commits
2 Commits
69afb24f63
...
61af290780
Author | SHA1 | Date |
---|---|---|
|
61af290780 | |
|
a9347ddd3a |
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "schat2-clive",
|
"name": "schat2-clive",
|
||||||
"version": "1.9.1",
|
"version": "1.9.2",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "schat2-clive",
|
"name": "schat2-clive",
|
||||||
"version": "1.9.1",
|
"version": "1.9.2",
|
||||||
"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.9.1",
|
"version": "1.9.2",
|
||||||
"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": {
|
||||||
|
|
|
@ -1,12 +1,18 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
const config = require('config');
|
const config = require('config');
|
||||||
|
|
||||||
function onCommand(args, context) {
|
function onCommand(args, context) {
|
||||||
context.bot.socket.transmit('message', {
|
if (config.platform === 'schat') {
|
||||||
roomId: context.room?.id,
|
context.sendMessage('Shutting down... :sleeping:', context.room?.id, { type: 'message', label: false }, context.message.user?.username);
|
||||||
recipient: context.message.user?.username,
|
}
|
||||||
body: 'Shutting down... :sleeping:',
|
|
||||||
style: config.style,
|
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.logger.info(`Kill command used by ${context.user.username}`);
|
context.logger.info(`Kill command used by ${context.user.username}`);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue