summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaksymilian Jopek <maks@jopek.eu>2024-09-28 15:48:10 +0200
committerMaksymilian Jopek <maks@jopek.eu>2024-09-28 15:48:10 +0200
commit7d92a424b6fe5e0361c1222d524822b04820507a (patch)
treecaaddd1c54a709db55162c825a200c9d27a07bef
parentdef14c0f2187f61bcef00f1298fcc60743b44c1b (diff)
downloadIRC-7d92a424b6fe5e0361c1222d524822b04820507a.tar.gz
IRC-7d92a424b6fe5e0361c1222d524822b04820507a.tar.zst
IRC-7d92a424b6fe5e0361c1222d524822b04820507a.zip
Small changeHEADmaster
-rw-r--r--src/index.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/index.ts b/src/index.ts
index c101b0f..1322659 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -2,6 +2,8 @@ import Messages, { Message } from "Modules/messages";
import Helpers from "Modules/helpers";
export default class Irc {
+ static quit = false;
+
private username: string;
private color: string;
private readonly messages = new Messages();
@@ -36,6 +38,9 @@ export default class Irc {
}
async poll(): Promise<void> {
+ if (Irc.quit === true) {
+ return;
+ }
fetch(this.messages.url + "poll")
.then(async res => {
const msg = await res.json();