feature/ban on fireplace placement in zone
This commit is contained in:
2 files changed
+6
-1
No files matched your search
+2
-1
@@ -8,7 +8,7 @@ const Logger = require("../util/Logger");
|
|||||||
const { DownloadNitradoFile, CheckServerStatus } = require('../util/NitradoAPI');
|
const { DownloadNitradoFile, CheckServerStatus } = require('../util/NitradoAPI');
|
||||||
const { HandlePlayerLogs, HandleActivePlayersList } = require('../util/LogsHandler');
|
const { HandlePlayerLogs, HandleActivePlayersList } = require('../util/LogsHandler');
|
||||||
const { HandleKillfeed, UpdateLastDeathDate } = require('../util/KillfeedHandler');
|
const { HandleKillfeed, UpdateLastDeathDate } = require('../util/KillfeedHandler');
|
||||||
const { HandleExpiredUAVs, HandleEvents } = require('../util/AlarmsHandler');
|
const { HandleExpiredUAVs, HandleEvents, PlaceFireplaceInAlarm } = require('../util/AlarmsHandler');
|
||||||
|
|
||||||
// Data structures imports
|
// Data structures imports
|
||||||
const { getDefaultPlayerStats } = require('../database/playerStatistics');
|
const { getDefaultPlayerStats } = require('../database/playerStatistics');
|
||||||
@@ -159,6 +159,7 @@ class DayzRBot extends Client {
|
|||||||
if (!(i + 1 >= lines.length) && lines[i + 1].includes('killed by Player') && lines[i].includes('hit by Player')) s = await HandleKillfeed(this, guildId, s, lines[i]); // Handles regular deaths
|
if (!(i + 1 >= lines.length) && lines[i + 1].includes('killed by Player') && lines[i].includes('hit by Player')) s = await HandleKillfeed(this, guildId, s, lines[i]); // Handles regular deaths
|
||||||
if (lines[i].includes('killed by Player') && !lines[i - 1].includes('hit by Player')) s = await HandleKillfeed(this, guildId, s, lines[i]); // Handles deaths missing hit by log
|
if (lines[i].includes('killed by Player') && !lines[i - 1].includes('hit by Player')) s = await HandleKillfeed(this, guildId, s, lines[i]); // Handles deaths missing hit by log
|
||||||
if (lines[i].includes('killed by Zmb') || lines[i].includes('>) died.')) s = await UpdateLastDeathDate(this, s, lines[i]); // Updates users last death date for non PVP deaths.
|
if (lines[i].includes('killed by Zmb') || lines[i].includes('>) died.')) s = await UpdateLastDeathDate(this, s, lines[i]); // Updates users last death date for non PVP deaths.
|
||||||
|
if (lines[i].includes(') placed Fireplace')) await PlaceFireplaceInAlarm(client, guildId, lines[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle alarm pings
|
// Handle alarm pings
|
||||||
|
|||||||
@@ -193,8 +193,10 @@ module.exports = {
|
|||||||
channel.send({ content: `<@&${alarm.role}>`, embeds: [alarmEmbed] });
|
channel.send({ content: `<@&${alarm.role}>`, embeds: [alarmEmbed] });
|
||||||
|
|
||||||
BanPlayer(client, data.killer);
|
BanPlayer(client, data.killer);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return;
|
||||||
},
|
},
|
||||||
|
|
||||||
PlaceFireplaceInAlarm: async (client, guildId, line) => {
|
PlaceFireplaceInAlarm: async (client, guildId, line) => {
|
||||||
@@ -234,8 +236,10 @@ module.exports = {
|
|||||||
channel.send({ content: `<@&${alarm.role}>`, embeds: [alarmEmbed] });
|
channel.send({ content: `<@&${alarm.role}>`, embeds: [alarmEmbed] });
|
||||||
|
|
||||||
BanPlayer(client, info.player);
|
BanPlayer(client, info.player);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return;
|
||||||
},
|
},
|
||||||
|
|
||||||
HandleEvents: async (client, guildId) => {
|
HandleEvents: async (client, guildId) => {
|
||||||
|
|||||||
Reference in new issue
Block a user