Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/lythx/trakman into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
lythx committed Aug 27, 2024
2 parents 2c3884d + 8720445 commit 921acda
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions plugins/commands/src/ChatCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ const commands: tm.Command[] = [
aliases: config.bootme.aliases,
help: config.bootme.help,
callback: (info: tm.MessageInfo): void => {
tm.sendMessage(tm.utils.strVar(config.bootme.text, { nickname: tm.utils.strip(info.nickname, false) }), config.bootme.public ? undefined : info.login)
tm.sendMessage(tm.utils.strVar(config.bootme.text, { nickname: tm.utils.strip(info.nickname, true) }), config.bootme.public ? undefined : info.login)
tm.client.callNoRes('Kick', [{ string: info.login }, { string: config.bootme.leaveText }])
},
privilege: config.bootme.privilege
Expand All @@ -173,7 +173,7 @@ const commands: tm.Command[] = [
aliases: config.rq.aliases,
help: config.rq.help,
callback: (info: tm.MessageInfo): void => {
tm.sendMessage(tm.utils.strVar(config.bootme.text, { nickname: tm.utils.strip(info.nickname, false) }), config.rq.public ? undefined : info.login)
tm.sendMessage(tm.utils.strVar(config.bootme.text, { nickname: tm.utils.strip(info.nickname, true) }), config.rq.public ? undefined : info.login)
tm.client.callNoRes('Kick', [{ string: info.login }, { string: config.rq.leaveText }])
},
privilege: config.rq.privilege
Expand Down
4 changes: 2 additions & 2 deletions plugins/commands/src/ServerCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ const commands: tm.Command[] = [
const player: tm.OfflinePlayer | undefined = tm.players.get(login) ?? await tm.players.fetch(login)
tm.sendMessage(tm.utils.strVar(config.pay.text, {
title: info.title,
adminName: info.nickname,
adminName: tm.utils.strip(info.nickname, true),
coppers: amount,
target: player?.nickname ?? login
target: tm.utils.strip(player?.nickname ?? login, true)
}), config.pay.public ? undefined : info.login)
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/database/MapRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ export class MapRepository extends Repository {
uids.forEach((map, i) => {
if (map !== undefined) {
values.push(
([i, map.name, map.fileName, map.author, environments[map.environment], moods[map.mood], map.bronzeTime,
([i, map.name.replaceAll('\n', ' '), map.fileName, map.author, environments[map.environment], moods[map.mood], map.bronzeTime,
map.silverTime, map.goldTime, map.authorTime, map.copperPrice, map.isLapRace, map.defaultLapsAmount,
map.checkpointsPerLap, map.addDate.toISOString(), map.leaderboardRating, map.awards]).map(
a => a === undefined ? '\\N' : a.toString()
.replaceAll('\t', ' ').replaceAll('\\', '')).join('\t')) // ugly replace to prevent DB errors
a => a === undefined ? '\\N' : a.toString()
.replaceAll('\t', ' ').replaceAll('\\', '')).join('\t')) // ugly replace to prevent DB errors
}
})
const bulk = values.join('\n')
Expand Down

0 comments on commit 921acda

Please sign in to comment.