aboutsummaryrefslogtreecommitdiff
path: root/chat
diff options
context:
space:
mode:
authorNinjune <enderknight537@gmail.com>2022-12-22 03:21:02 -0600
committerNinjune <enderknight537@gmail.com>2022-12-22 03:21:02 -0600
commit329dccf50ed5e9f87531580f679522238b6a019b (patch)
tree3053852d322db744822a7dd2a05fd59d2b1e90b7 /chat
parent1ffc0a89be42fcde95a04a87cc00dbc347b27ece (diff)
downloadcoleweight-329dccf50ed5e9f87531580f679522238b6a019b.tar.gz
coleweight-329dccf50ed5e9f87531580f679522238b6a019b.tar.bz2
coleweight-329dccf50ed5e9f87531580f679522238b6a019b.zip
v1.8.3
Diffstat (limited to 'chat')
-rw-r--r--chat/apiNew.js4
-rw-r--r--chat/grieferTrack.js12
-rw-r--r--chat/message.js38
3 files changed, 11 insertions, 43 deletions
diff --git a/chat/apiNew.js b/chat/apiNew.js
index eaab375..76a2418 100644
--- a/chat/apiNew.js
+++ b/chat/apiNew.js
@@ -16,9 +16,9 @@ register("chat", (key) => {
ChatLib.chat(`${PREFIX}&eKey is not valid!`)
})
.catch(err => {
- ChatLib.chat(`${PREFIX}&eKey is not valid!`)
+ ChatLib.chat(`${PREFIX}&eKey is not valid! if this is a mistake report: ${err}`)
})
- ChatLib.chat(ChatLib.getCenteredText(`${PREFIX}&aApi Key Successfully Set!`))
+ ChatLib.chat(`${PREFIX}&aApi Key Successfully Set!`)
}).setCriteria(/Your new API key is (.+)/)
export default "" \ No newline at end of file
diff --git a/chat/grieferTrack.js b/chat/grieferTrack.js
index f4ae0e4..a939b45 100644
--- a/chat/grieferTrack.js
+++ b/chat/grieferTrack.js
@@ -1,6 +1,5 @@
import axios from "../../axios"
import settings from "../settings"
-import Settings from "../settings"
import constants from "../util/constants"
const PREFIX = constants.PREFIX
let checkedPlayers = [],
@@ -26,7 +25,7 @@ register("worldLoad", () => {
function checkMMiners()
{
- if (!Settings.trackGriefers) return
+ if (!settings.trackGriefers) return
try
{
const NetHandlerPlayClient = Client.getConnection(),
@@ -37,8 +36,13 @@ function checkMMiners()
if(!checkedPlayers.includes(player))
{
- if(griefers.includes(player))
- ChatLib.chat(`${PREFIX}&e'${player}' is a griefer!`)
+ griefers.forEach(griefer => {
+ let dateObj = new Date(0)
+ dateObj.setUTCMilliseconds(griefer.timestamp)
+
+ if(griefer.name == player)
+ ChatLib.chat(`${PREFIX}&e'${player}' has griefed &e&l${griefer.offences} &etime(s). Their last grief was on ${dateObj.toString().slice(4, 15)}.`)
+ })
checkedPlayers.push(player)
}
})
diff --git a/chat/message.js b/chat/message.js
index 60245de..f55ecba 100644
--- a/chat/message.js
+++ b/chat/message.js
@@ -50,43 +50,6 @@ register("gameLoad", () => {
})
})
-
-register("messageSent", (origMessage, event) => { // emotes! this was fun to make :)
- let commandState = 0,
- command = "",
- colonIndex1 = -1,
- message = ""
-
- for(let charIndex = 0; charIndex < origMessage.length; charIndex++)
- {
- if(origMessage[charIndex] == ":" && commandState == 0)
- {
- colonIndex1 = charIndex
- commandState = 1
- }
- else if (origMessage[charIndex] == ":" && commandState == 1)
- {
- commandState = 2
- command = origMessage.slice(colonIndex1 + 1, charIndex).toLowerCase()
- }
- }
- if(command == "shrug")
- {
- cancel(event)
- emote = "¯\\_(ツ)_/¯"
- }
- else if (command == "lenny")
- {
- cancel(event)
- emote = "( ͡° ͜ʖ ͡°)"
- }
- else
- return
- message = origMessage.slice(0, colonIndex1) + emote + origMessage.slice(colonIndex1 + 2 + command.length, origMessage.length)
- ChatLib.say(`${message}`)
-})
-
-
// first time check
register("step", () => {
if (constants.data.first_time)
@@ -102,4 +65,5 @@ register("step", () => {
if (constants.data.api_key == undefined || constants.data.api_key == "") return
}).setFps(1);
+
export default "" \ No newline at end of file