Compare commits

..

2 Commits

Author SHA1 Message Date
ThePendulum ffdfefa6d4 1.26.12 2023-08-21 23:12:06 +02:00
ThePendulum b3ab3bf1ba Fixed kill announce for IRC.. 2023-08-21 23:12:02 +02:00
3 changed files with 7 additions and 9 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "schat2-clive", "name": "schat2-clive",
"version": "1.26.11", "version": "1.26.12",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "schat2-clive", "name": "schat2-clive",
"version": "1.26.11", "version": "1.26.12",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"better-sqlite3": "^8.3.0", "better-sqlite3": "^8.3.0",

View File

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

@ -15,16 +15,14 @@ function onCommand(args, context) {
} }
} }
if (context.platform === 'irc') { if (config.platform === 'irc') {
Object.keys(context.bot.rooms).forEach((roomId) => { context.bot.rooms.forEach((room) => {
context.sendMessage(`Kill command used by ${style.bold(context.user.username)}, shutting down... :sleeping:`, roomId, { type: 'message', label: false }); context.sendMessage(`Kill command used by ${style.bold(context.user.username)}, shutting down... 😴`, room.id, { type: 'message', label: false });
}); });
if (context.room.id === config.user.id) { if (context.room.id === config.user.id) {
// if the room ID is the bot's own nickname, it's a PM and we should reply to the sender // 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 }); context.sendMessage('Shutting down... 😴', context.user.id, { type: 'message', label: false }, context.message.user.username);
} else {
context.sendMessage('Shutting down... 😴', context.room?.id, { type: 'message', label: false });
} }
} }