Add player_colors flag
This commit is contained in:
parent
12bb3321c3
commit
00a222a88a
2
public
2
public
|
@ -1 +1 @@
|
|||
Subproject commit 98068b00b2678a8bb98a5979c4192c306af65657
|
||||
Subproject commit 13f4a8383c8a53551647118e5252f78a8ef00939
|
|
@ -982,6 +982,17 @@ export class Channel extends EventEmitter {
|
|||
if (part.id !== this.crown.participantId) return;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.flags.player_colors) {
|
||||
if (this.getSetting("color") !== part.color) {
|
||||
this.changeSettings(
|
||||
{
|
||||
color: part.color
|
||||
},
|
||||
true
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const clientMsg: OutgoingSocketEvents["n"] = {
|
||||
|
@ -1128,7 +1139,7 @@ export class Channel extends EventEmitter {
|
|||
banner?: string
|
||||
) {
|
||||
const now = Date.now();
|
||||
if (t < 0 || t > 300 * 60 * 1000) return;
|
||||
if (t < 0 || t > config.maxBanMinutes * 60 * 1000) return;
|
||||
|
||||
let shouldUpdate = false;
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ interface ChannelConfig {
|
|||
sendLimit: boolean;
|
||||
chownOnRejoin: boolean;
|
||||
channelDestroyTimeout: number;
|
||||
maxBanMinutes: number;
|
||||
}
|
||||
|
||||
export const config = ConfigManager.loadConfig<ChannelConfig>(
|
||||
|
@ -44,6 +45,7 @@ export const config = ConfigManager.loadConfig<ChannelConfig>(
|
|||
fullChannel: "test/awkward",
|
||||
sendLimit: false,
|
||||
chownOnRejoin: true,
|
||||
channelDestroyTimeout: 1000
|
||||
channelDestroyTimeout: 1000,
|
||||
maxBanMinutes: 60
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue