We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f34af4a commit 7a44f2dCopy full SHA for 7a44f2d
server/chat-plugins/helptickets.ts
@@ -352,6 +352,16 @@ export class HelpTicket extends Rooms.RoomGame {
352
// @ts-ignore
353
this.playerTable = null;
354
}
355
+ onChatMessage(message: string, user: User) {
356
+ const roomids = message.match(/battle-(?:[a-z0-9]+)-(?:[0-9]+)(?:-[a-z0-9]+pw)?/g);
357
+ if (roomids) {
358
+ for (const roomid of roomids) {
359
+ const curRoom = Rooms.get(roomid);
360
+ if (!curRoom || !('uploadReplay' in curRoom) || curRoom?.battle?.replaySaved) continue;
361
+ void curRoom.uploadReplay(user, user.connections[0], 'forpunishment');
362
+ }
363
364
365
static ban(user: User | ID, reason = '') {
366
const userid = toID(user);
367
const userObj = Users.get(user);
0 commit comments