Skip to content
Snippets Groups Projects
Commit 1d3d066e authored by echicken's avatar echicken :chicken:
Browse files

bip bip

parent 5e9f4ca9
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,7 @@ const msgPointers: Record<string, number> = {};
user.number = userNumber;
let ircNick: string = user.handle ?? user.alias;
let ircNick: string = user.alias;
let ircSock = irclib.IRC_client_connect(IRC_SERVER, ircNick, user.alias, user.alias, IRC_PORT);
let ircReady: boolean = false;
let ircJoined: boolean = false;
......@@ -128,6 +128,8 @@ function cycleIRC(): void {
}
}
const testFile = `${js.exec_dir}test.txt`;
js.time_limit = 0;
let now = time();
......@@ -140,7 +142,16 @@ while (!js.terminated && !queue.orphan && queue.peek(100) !== '\x04') {
scanSubs();
}
scanInstantMessages();
cycleIRC();
}
cycleIRC(); // This needs to be done regardless, else we might miss a PING
if (js.global.file_exists(testFile)) {
let f = new File(testFile);
if (f.open('r')) {
let txt = f.read();
f.close()
f.remove();
queue.write(txt);
}
}
}
......
......@@ -121,7 +121,7 @@ export default class ActivityWindow extends ShellWindow {
const msg: string[] = [];
while (!js.terminated && queue.data_waiting) {
const str = queue.read();
if (str !== '\x04') msg.push(str);
msg.push(str.replace(/[\x00\x02-\x09\x0B\x0C\x0E-\x1F]/g, ''));
}
if (msg.length < 1) return;
const now = time();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment