Compare commits

..

No commits in common. "8eef0cd925d24fd4464146484d59f30c649d2e80" and "71c2f1b3d67d7125a2d5b77c68ae3a64fe100db2" have entirely different histories.

3 changed files with 8 additions and 27 deletions

View File

@ -527,7 +527,7 @@ export class Channel extends EventEmitter {
if (chid == config.fullChannel) {
const banTime = this.getBanTime(socket.getUserID());
//this.logger.debug("Ban time:", banTime);
this.logger.debug("Ban time:", banTime);
if (banTime) {
const minutes = Math.floor((banTime.endTime - banTime.startTime) / 1000 / 60);
@ -827,34 +827,26 @@ export class Channel extends EventEmitter {
* @param socket Socket that is sending notes
* @returns undefined
*/
public playNotes(msg: ServerEvents["n"], socket?: Socket) {
public playNotes(msg: ServerEvents["n"], socket: Socket) {
if (this.isDestroyed()) return;
let pianoPartID = usersConfig.adminParticipant.id;
if (socket) {
const part = socket.getParticipant();
if (!part) return;
pianoPartID = part.id;
}
let clientMsg: ClientEvents["n"] = {
m: "n",
n: msg.n,
t: msg.t,
p: pianoPartID
p: part.id
};
let sentSocketIDs = new Array<string>();
for (const p of this.ppl) {
socketLoop: for (const sock of socketsBySocketID.values()) {
this.logger.debug(`Socket ${sock.getUUID()}`);
if (sock.isDestroyed()) continue socketLoop;
if (!sock.socketID) continue socketLoop;
if (socket) {
if (sock.getUUID() == socket.getUUID()) continue socketLoop;
}
if (sock.getParticipantID() != p.id) continue socketLoop;
//if (socket.getParticipantID() == part.id) continue socketLoop;
if (sentSocketIDs.includes(sock.socketID)) continue socketLoop;

View File

@ -48,14 +48,6 @@ export class ChannelList {
return this.list;
}
public static getChannel(_id: string) {
return this.list.find(ch => ch.getID() === _id);
}
public static getChannelFuzzy(text: string) {
return this.list.find(ch => ch.getID().toLowerCase() == text.toLowerCase());
}
public static getPublicList() {
return this.list.filter(ch => ch.getSetting("visible") == true);
}

View File

@ -111,12 +111,9 @@ Command.addCommand(
return bytes;
}
const argcat = msg.args.slice(1).join(" ");
if (msg.args.length > 1) {
try {
const output = eval(argcat);
const output = eval(msg.args[1]);
return output;
} catch (err) {
return err;