cvm-rs: merge guac and jpeg libs together into one

doesn't really need to be two seperate libraries. also preperation for other funnies

the build script has been replaced with a much saner justfile which uses much saner "yarn workspace" invocations instead of blindly cding all over the place
This commit is contained in:
modeco80
2024-06-22 21:14:05 -04:00
parent 87a377a10f
commit b8ed177885
26 changed files with 246 additions and 414 deletions

View File

@@ -1,5 +1,5 @@
import * as Utilities from './Utilities.js';
import * as guac from '@cvmts/guac-rs';
import * as cvm from '@cvmts/cvm-rs';
import { IPData } from './IPData.js';
import IConfig from './IConfig.js';
import RateLimiter from './RateLimiter.js';
@@ -95,7 +95,7 @@ export class User {
}
closeConnection() {
this.socket.send(guac.guacEncode('disconnect'));
this.socket.send(cvm.guacEncode('disconnect'));
this.socket.close();
}
@@ -115,7 +115,7 @@ export class User {
mute(permanent: boolean) {
this.IP.muted = true;
this.sendMsg(guac.guacEncode('chat', '', `You have been muted${permanent ? '' : ` for ${this.Config.collabvm.tempMuteTime} seconds`}.`));
this.sendMsg(cvm.guacEncode('chat', '', `You have been muted${permanent ? '' : ` for ${this.Config.collabvm.tempMuteTime} seconds`}.`));
if (!permanent) {
clearTimeout(this.IP.tempMuteExpireTimeout);
this.IP.tempMuteExpireTimeout = setTimeout(() => this.unmute(), this.Config.collabvm.tempMuteTime * 1000);
@@ -124,7 +124,7 @@ export class User {
unmute() {
clearTimeout(this.IP.tempMuteExpireTimeout);
this.IP.muted = false;
this.sendMsg(guac.guacEncode('chat', '', 'You are no longer muted.'));
this.sendMsg(cvm.guacEncode('chat', '', 'You are no longer muted.'));
}
private banCmdArgs(arg: string): string {