@sockethub/irc2as 4.0.0-alpha.9 → 4.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,791 +1,37 @@
1
- import { createRequire } from "node:module";
2
- var __create = Object.create;
3
- var __getProtoOf = Object.getPrototypeOf;
4
- var __defProp = Object.defineProperty;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __toESM = (mod, isNodeMode, target) => {
8
- target = mod != null ? __create(__getProtoOf(mod)) : {};
9
- const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
10
- for (let key of __getOwnPropNames(mod))
11
- if (!__hasOwnProp.call(to, key))
12
- __defProp(to, key, {
13
- get: () => mod[key],
14
- enumerable: true
15
- });
16
- return to;
17
- };
18
- var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
19
- var __require = /* @__PURE__ */ createRequire(import.meta.url);
20
-
21
- // ../../node_modules/ms/index.js
22
- var require_ms = __commonJS((exports, module) => {
23
- var s = 1000;
24
- var m = s * 60;
25
- var h = m * 60;
26
- var d = h * 24;
27
- var w = d * 7;
28
- var y = d * 365.25;
29
- module.exports = function(val, options) {
30
- options = options || {};
31
- var type = typeof val;
32
- if (type === "string" && val.length > 0) {
33
- return parse(val);
34
- } else if (type === "number" && isFinite(val)) {
35
- return options.long ? fmtLong(val) : fmtShort(val);
36
- }
37
- throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val));
38
- };
39
- function parse(str) {
40
- str = String(str);
41
- if (str.length > 100) {
42
- return;
43
- }
44
- var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);
45
- if (!match) {
46
- return;
47
- }
48
- var n = parseFloat(match[1]);
49
- var type = (match[2] || "ms").toLowerCase();
50
- switch (type) {
51
- case "years":
52
- case "year":
53
- case "yrs":
54
- case "yr":
55
- case "y":
56
- return n * y;
57
- case "weeks":
58
- case "week":
59
- case "w":
60
- return n * w;
61
- case "days":
62
- case "day":
63
- case "d":
64
- return n * d;
65
- case "hours":
66
- case "hour":
67
- case "hrs":
68
- case "hr":
69
- case "h":
70
- return n * h;
71
- case "minutes":
72
- case "minute":
73
- case "mins":
74
- case "min":
75
- case "m":
76
- return n * m;
77
- case "seconds":
78
- case "second":
79
- case "secs":
80
- case "sec":
81
- case "s":
82
- return n * s;
83
- case "milliseconds":
84
- case "millisecond":
85
- case "msecs":
86
- case "msec":
87
- case "ms":
88
- return n;
89
- default:
90
- return;
91
- }
92
- }
93
- function fmtShort(ms) {
94
- var msAbs = Math.abs(ms);
95
- if (msAbs >= d) {
96
- return Math.round(ms / d) + "d";
97
- }
98
- if (msAbs >= h) {
99
- return Math.round(ms / h) + "h";
100
- }
101
- if (msAbs >= m) {
102
- return Math.round(ms / m) + "m";
103
- }
104
- if (msAbs >= s) {
105
- return Math.round(ms / s) + "s";
106
- }
107
- return ms + "ms";
108
- }
109
- function fmtLong(ms) {
110
- var msAbs = Math.abs(ms);
111
- if (msAbs >= d) {
112
- return plural(ms, msAbs, d, "day");
113
- }
114
- if (msAbs >= h) {
115
- return plural(ms, msAbs, h, "hour");
116
- }
117
- if (msAbs >= m) {
118
- return plural(ms, msAbs, m, "minute");
119
- }
120
- if (msAbs >= s) {
121
- return plural(ms, msAbs, s, "second");
122
- }
123
- return ms + " ms";
124
- }
125
- function plural(ms, msAbs, n, name) {
126
- var isPlural = msAbs >= n * 1.5;
127
- return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
128
- }
129
- });
130
-
131
- // ../../node_modules/debug/src/common.js
132
- var require_common = __commonJS((exports, module) => {
133
- function setup(env) {
134
- createDebug.debug = createDebug;
135
- createDebug.default = createDebug;
136
- createDebug.coerce = coerce;
137
- createDebug.disable = disable;
138
- createDebug.enable = enable;
139
- createDebug.enabled = enabled;
140
- createDebug.humanize = require_ms();
141
- createDebug.destroy = destroy;
142
- Object.keys(env).forEach((key) => {
143
- createDebug[key] = env[key];
144
- });
145
- createDebug.names = [];
146
- createDebug.skips = [];
147
- createDebug.formatters = {};
148
- function selectColor(namespace) {
149
- let hash = 0;
150
- for (let i = 0;i < namespace.length; i++) {
151
- hash = (hash << 5) - hash + namespace.charCodeAt(i);
152
- hash |= 0;
153
- }
154
- return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
155
- }
156
- createDebug.selectColor = selectColor;
157
- function createDebug(namespace) {
158
- let prevTime;
159
- let enableOverride = null;
160
- let namespacesCache;
161
- let enabledCache;
162
- function debug(...args) {
163
- if (!debug.enabled) {
164
- return;
165
- }
166
- const self = debug;
167
- const curr = Number(new Date);
168
- const ms = curr - (prevTime || curr);
169
- self.diff = ms;
170
- self.prev = prevTime;
171
- self.curr = curr;
172
- prevTime = curr;
173
- args[0] = createDebug.coerce(args[0]);
174
- if (typeof args[0] !== "string") {
175
- args.unshift("%O");
176
- }
177
- let index = 0;
178
- args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
179
- if (match === "%%") {
180
- return "%";
181
- }
182
- index++;
183
- const formatter = createDebug.formatters[format];
184
- if (typeof formatter === "function") {
185
- const val = args[index];
186
- match = formatter.call(self, val);
187
- args.splice(index, 1);
188
- index--;
189
- }
190
- return match;
191
- });
192
- createDebug.formatArgs.call(self, args);
193
- const logFn = self.log || createDebug.log;
194
- logFn.apply(self, args);
195
- }
196
- debug.namespace = namespace;
197
- debug.useColors = createDebug.useColors();
198
- debug.color = createDebug.selectColor(namespace);
199
- debug.extend = extend;
200
- debug.destroy = createDebug.destroy;
201
- Object.defineProperty(debug, "enabled", {
202
- enumerable: true,
203
- configurable: false,
204
- get: () => {
205
- if (enableOverride !== null) {
206
- return enableOverride;
207
- }
208
- if (namespacesCache !== createDebug.namespaces) {
209
- namespacesCache = createDebug.namespaces;
210
- enabledCache = createDebug.enabled(namespace);
211
- }
212
- return enabledCache;
213
- },
214
- set: (v) => {
215
- enableOverride = v;
216
- }
217
- });
218
- if (typeof createDebug.init === "function") {
219
- createDebug.init(debug);
220
- }
221
- return debug;
222
- }
223
- function extend(namespace, delimiter) {
224
- const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
225
- newDebug.log = this.log;
226
- return newDebug;
227
- }
228
- function enable(namespaces) {
229
- createDebug.save(namespaces);
230
- createDebug.namespaces = namespaces;
231
- createDebug.names = [];
232
- createDebug.skips = [];
233
- const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
234
- for (const ns of split) {
235
- if (ns[0] === "-") {
236
- createDebug.skips.push(ns.slice(1));
237
- } else {
238
- createDebug.names.push(ns);
239
- }
240
- }
241
- }
242
- function matchesTemplate(search, template) {
243
- let searchIndex = 0;
244
- let templateIndex = 0;
245
- let starIndex = -1;
246
- let matchIndex = 0;
247
- while (searchIndex < search.length) {
248
- if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
249
- if (template[templateIndex] === "*") {
250
- starIndex = templateIndex;
251
- matchIndex = searchIndex;
252
- templateIndex++;
253
- } else {
254
- searchIndex++;
255
- templateIndex++;
256
- }
257
- } else if (starIndex !== -1) {
258
- templateIndex = starIndex + 1;
259
- matchIndex++;
260
- searchIndex = matchIndex;
261
- } else {
262
- return false;
263
- }
264
- }
265
- while (templateIndex < template.length && template[templateIndex] === "*") {
266
- templateIndex++;
267
- }
268
- return templateIndex === template.length;
269
- }
270
- function disable() {
271
- const namespaces = [
272
- ...createDebug.names,
273
- ...createDebug.skips.map((namespace) => "-" + namespace)
274
- ].join(",");
275
- createDebug.enable("");
276
- return namespaces;
277
- }
278
- function enabled(name) {
279
- for (const skip of createDebug.skips) {
280
- if (matchesTemplate(name, skip)) {
281
- return false;
282
- }
283
- }
284
- for (const ns of createDebug.names) {
285
- if (matchesTemplate(name, ns)) {
286
- return true;
287
- }
288
- }
289
- return false;
290
- }
291
- function coerce(val) {
292
- if (val instanceof Error) {
293
- return val.stack || val.message;
294
- }
295
- return val;
296
- }
297
- function destroy() {
298
- console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
299
- }
300
- createDebug.enable(createDebug.load());
301
- return createDebug;
302
- }
303
- module.exports = setup;
304
- });
305
-
306
- // ../../node_modules/debug/src/browser.js
307
- var require_browser = __commonJS((exports, module) => {
308
- exports.formatArgs = formatArgs;
309
- exports.save = save;
310
- exports.load = load;
311
- exports.useColors = useColors;
312
- exports.storage = localstorage();
313
- exports.destroy = (() => {
314
- let warned = false;
315
- return () => {
316
- if (!warned) {
317
- warned = true;
318
- console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
319
- }
320
- };
321
- })();
322
- exports.colors = [
323
- "#0000CC",
324
- "#0000FF",
325
- "#0033CC",
326
- "#0033FF",
327
- "#0066CC",
328
- "#0066FF",
329
- "#0099CC",
330
- "#0099FF",
331
- "#00CC00",
332
- "#00CC33",
333
- "#00CC66",
334
- "#00CC99",
335
- "#00CCCC",
336
- "#00CCFF",
337
- "#3300CC",
338
- "#3300FF",
339
- "#3333CC",
340
- "#3333FF",
341
- "#3366CC",
342
- "#3366FF",
343
- "#3399CC",
344
- "#3399FF",
345
- "#33CC00",
346
- "#33CC33",
347
- "#33CC66",
348
- "#33CC99",
349
- "#33CCCC",
350
- "#33CCFF",
351
- "#6600CC",
352
- "#6600FF",
353
- "#6633CC",
354
- "#6633FF",
355
- "#66CC00",
356
- "#66CC33",
357
- "#9900CC",
358
- "#9900FF",
359
- "#9933CC",
360
- "#9933FF",
361
- "#99CC00",
362
- "#99CC33",
363
- "#CC0000",
364
- "#CC0033",
365
- "#CC0066",
366
- "#CC0099",
367
- "#CC00CC",
368
- "#CC00FF",
369
- "#CC3300",
370
- "#CC3333",
371
- "#CC3366",
372
- "#CC3399",
373
- "#CC33CC",
374
- "#CC33FF",
375
- "#CC6600",
376
- "#CC6633",
377
- "#CC9900",
378
- "#CC9933",
379
- "#CCCC00",
380
- "#CCCC33",
381
- "#FF0000",
382
- "#FF0033",
383
- "#FF0066",
384
- "#FF0099",
385
- "#FF00CC",
386
- "#FF00FF",
387
- "#FF3300",
388
- "#FF3333",
389
- "#FF3366",
390
- "#FF3399",
391
- "#FF33CC",
392
- "#FF33FF",
393
- "#FF6600",
394
- "#FF6633",
395
- "#FF9900",
396
- "#FF9933",
397
- "#FFCC00",
398
- "#FFCC33"
399
- ];
400
- function useColors() {
401
- if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
402
- return true;
403
- }
404
- if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
405
- return false;
406
- }
407
- let m;
408
- return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
409
- }
410
- function formatArgs(args) {
411
- args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff);
412
- if (!this.useColors) {
413
- return;
414
- }
415
- const c = "color: " + this.color;
416
- args.splice(1, 0, c, "color: inherit");
417
- let index = 0;
418
- let lastC = 0;
419
- args[0].replace(/%[a-zA-Z%]/g, (match) => {
420
- if (match === "%%") {
421
- return;
422
- }
423
- index++;
424
- if (match === "%c") {
425
- lastC = index;
426
- }
427
- });
428
- args.splice(lastC, 0, c);
429
- }
430
- exports.log = console.debug || console.log || (() => {});
431
- function save(namespaces) {
432
- try {
433
- if (namespaces) {
434
- exports.storage.setItem("debug", namespaces);
435
- } else {
436
- exports.storage.removeItem("debug");
437
- }
438
- } catch (error) {}
439
- }
440
- function load() {
441
- let r;
442
- try {
443
- r = exports.storage.getItem("debug") || exports.storage.getItem("DEBUG");
444
- } catch (error) {}
445
- if (!r && typeof process !== "undefined" && "env" in process) {
446
- r = process.env.DEBUG;
447
- }
448
- return r;
449
- }
450
- function localstorage() {
451
- try {
452
- return localStorage;
453
- } catch (error) {}
454
- }
455
- module.exports = require_common()(exports);
456
- var { formatters } = module.exports;
457
- formatters.j = function(v) {
458
- try {
459
- return JSON.stringify(v);
460
- } catch (error) {
461
- return "[UnexpectedJSONParseError]: " + error.message;
462
- }
463
- };
464
- });
465
-
466
- // ../../node_modules/has-flag/index.js
467
- var require_has_flag = __commonJS((exports, module) => {
468
- module.exports = (flag, argv = process.argv) => {
469
- const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
470
- const position = argv.indexOf(prefix + flag);
471
- const terminatorPosition = argv.indexOf("--");
472
- return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
473
- };
474
- });
475
-
476
- // ../../node_modules/supports-color/index.js
477
- var require_supports_color = __commonJS((exports, module) => {
478
- var os = __require("os");
479
- var tty = __require("tty");
480
- var hasFlag = require_has_flag();
481
- var { env } = process;
482
- var flagForceColor;
483
- if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
484
- flagForceColor = 0;
485
- } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
486
- flagForceColor = 1;
487
- }
488
- function envForceColor() {
489
- if ("FORCE_COLOR" in env) {
490
- if (env.FORCE_COLOR === "true") {
491
- return 1;
492
- }
493
- if (env.FORCE_COLOR === "false") {
494
- return 0;
495
- }
496
- return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
497
- }
498
- }
499
- function translateLevel(level) {
500
- if (level === 0) {
501
- return false;
502
- }
503
- return {
504
- level,
505
- hasBasic: true,
506
- has256: level >= 2,
507
- has16m: level >= 3
508
- };
509
- }
510
- function supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
511
- const noFlagForceColor = envForceColor();
512
- if (noFlagForceColor !== undefined) {
513
- flagForceColor = noFlagForceColor;
514
- }
515
- const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
516
- if (forceColor === 0) {
517
- return 0;
518
- }
519
- if (sniffFlags) {
520
- if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
521
- return 3;
522
- }
523
- if (hasFlag("color=256")) {
524
- return 2;
525
- }
526
- }
527
- if (haveStream && !streamIsTTY && forceColor === undefined) {
528
- return 0;
529
- }
530
- const min = forceColor || 0;
531
- if (env.TERM === "dumb") {
532
- return min;
533
- }
534
- if (process.platform === "win32") {
535
- const osRelease = os.release().split(".");
536
- if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
537
- return Number(osRelease[2]) >= 14931 ? 3 : 2;
538
- }
539
- return 1;
540
- }
541
- if ("CI" in env) {
542
- if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE", "DRONE"].some((sign) => (sign in env)) || env.CI_NAME === "codeship") {
543
- return 1;
544
- }
545
- return min;
546
- }
547
- if ("TEAMCITY_VERSION" in env) {
548
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
549
- }
550
- if (env.COLORTERM === "truecolor") {
551
- return 3;
552
- }
553
- if ("TERM_PROGRAM" in env) {
554
- const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
555
- switch (env.TERM_PROGRAM) {
556
- case "iTerm.app":
557
- return version >= 3 ? 3 : 2;
558
- case "Apple_Terminal":
559
- return 2;
560
- }
561
- }
562
- if (/-256(color)?$/i.test(env.TERM)) {
563
- return 2;
564
- }
565
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
566
- return 1;
567
- }
568
- if ("COLORTERM" in env) {
569
- return 1;
570
- }
571
- return min;
572
- }
573
- function getSupportLevel(stream, options = {}) {
574
- const level = supportsColor(stream, {
575
- streamIsTTY: stream && stream.isTTY,
576
- ...options
577
- });
578
- return translateLevel(level);
579
- }
580
- module.exports = {
581
- supportsColor: getSupportLevel,
582
- stdout: getSupportLevel({ isTTY: tty.isatty(1) }),
583
- stderr: getSupportLevel({ isTTY: tty.isatty(2) })
584
- };
585
- });
586
-
587
- // ../../node_modules/debug/src/node.js
588
- var require_node = __commonJS((exports, module) => {
589
- var tty = __require("tty");
590
- var util = __require("util");
591
- exports.init = init;
592
- exports.log = log;
593
- exports.formatArgs = formatArgs;
594
- exports.save = save;
595
- exports.load = load;
596
- exports.useColors = useColors;
597
- exports.destroy = util.deprecate(() => {}, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
598
- exports.colors = [6, 2, 3, 4, 5, 1];
599
- try {
600
- const supportsColor = require_supports_color();
601
- if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
602
- exports.colors = [
603
- 20,
604
- 21,
605
- 26,
606
- 27,
607
- 32,
608
- 33,
609
- 38,
610
- 39,
611
- 40,
612
- 41,
613
- 42,
614
- 43,
615
- 44,
616
- 45,
617
- 56,
618
- 57,
619
- 62,
620
- 63,
621
- 68,
622
- 69,
623
- 74,
624
- 75,
625
- 76,
626
- 77,
627
- 78,
628
- 79,
629
- 80,
630
- 81,
631
- 92,
632
- 93,
633
- 98,
634
- 99,
635
- 112,
636
- 113,
637
- 128,
638
- 129,
639
- 134,
640
- 135,
641
- 148,
642
- 149,
643
- 160,
644
- 161,
645
- 162,
646
- 163,
647
- 164,
648
- 165,
649
- 166,
650
- 167,
651
- 168,
652
- 169,
653
- 170,
654
- 171,
655
- 172,
656
- 173,
657
- 178,
658
- 179,
659
- 184,
660
- 185,
661
- 196,
662
- 197,
663
- 198,
664
- 199,
665
- 200,
666
- 201,
667
- 202,
668
- 203,
669
- 204,
670
- 205,
671
- 206,
672
- 207,
673
- 208,
674
- 209,
675
- 214,
676
- 215,
677
- 220,
678
- 221
679
- ];
680
- }
681
- } catch (error) {}
682
- exports.inspectOpts = Object.keys(process.env).filter((key) => {
683
- return /^debug_/i.test(key);
684
- }).reduce((obj, key) => {
685
- const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => {
686
- return k.toUpperCase();
687
- });
688
- let val = process.env[key];
689
- if (/^(yes|on|true|enabled)$/i.test(val)) {
690
- val = true;
691
- } else if (/^(no|off|false|disabled)$/i.test(val)) {
692
- val = false;
693
- } else if (val === "null") {
694
- val = null;
695
- } else {
696
- val = Number(val);
697
- }
698
- obj[prop] = val;
699
- return obj;
700
- }, {});
701
- function useColors() {
702
- return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
703
- }
704
- function formatArgs(args) {
705
- const { namespace: name, useColors: useColors2 } = this;
706
- if (useColors2) {
707
- const c = this.color;
708
- const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
709
- const prefix = ` ${colorCode};1m${name} \x1B[0m`;
710
- args[0] = prefix + args[0].split(`
711
- `).join(`
712
- ` + prefix);
713
- args.push(colorCode + "m+" + module.exports.humanize(this.diff) + "\x1B[0m");
714
- } else {
715
- args[0] = getDate() + name + " " + args[0];
716
- }
717
- }
718
- function getDate() {
719
- if (exports.inspectOpts.hideDate) {
720
- return "";
721
- }
722
- return new Date().toISOString() + " ";
723
- }
724
- function log(...args) {
725
- return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + `
726
- `);
727
- }
728
- function save(namespaces) {
729
- if (namespaces) {
730
- process.env.DEBUG = namespaces;
731
- } else {
732
- delete process.env.DEBUG;
733
- }
734
- }
735
- function load() {
736
- return process.env.DEBUG;
737
- }
738
- function init(debug) {
739
- debug.inspectOpts = {};
740
- const keys = Object.keys(exports.inspectOpts);
741
- for (let i = 0;i < keys.length; i++) {
742
- debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
743
- }
744
- }
745
- module.exports = require_common()(exports);
746
- var { formatters } = module.exports;
747
- formatters.o = function(v) {
748
- this.inspectOpts.colors = this.useColors;
749
- return util.inspect(v, this.inspectOpts).split(`
750
- `).map((str) => str.trim()).join(" ");
751
- };
752
- formatters.O = function(v) {
753
- this.inspectOpts.colors = this.useColors;
754
- return util.inspect(v, this.inspectOpts);
755
- };
756
- });
757
-
758
- // ../../node_modules/debug/src/index.js
759
- var require_src = __commonJS((exports, module) => {
760
- if (typeof process === "undefined" || process.type === "renderer" || false || process.__nwjs) {
761
- module.exports = require_browser();
762
- } else {
763
- module.exports = require_node();
764
- }
765
- });
766
-
767
1
  // src/index.js
768
- var import_debug = __toESM(require_src(), 1);
769
2
  import events from "node:events";
770
3
 
771
4
  // src/as-emitter.js
772
5
  var EVENT_INCOMING = "incoming";
773
6
  var EVENT_ERROR = "error";
7
+ var EVENT_CTCP = "ctcp";
8
+ var CTCP_FRAME = /^[+-]?\u0001([^\u0001 ]+)(?: ([\s\S]*?))?\u0001?$/;
9
+ function parseCtcp(content) {
10
+ const match = CTCP_FRAME.exec(content);
11
+ if (!match) {
12
+ return null;
13
+ }
14
+ return { command: match[1].toUpperCase(), args: match[2] ?? "" };
15
+ }
774
16
 
775
17
  class ASEmitter {
776
- constructor(events, server) {
18
+ constructor(events, server, contexts) {
19
+ if (!Array.isArray(contexts) || contexts.length === 0) {
20
+ throw new Error("ASEmitter requires a non-empty contexts array from the caller");
21
+ }
777
22
  this.server = server;
778
23
  this.events = events;
24
+ this.contexts = [...contexts];
779
25
  }
780
26
  emitEvent(code, asObject) {
781
27
  if (typeof asObject === "object" && !asObject.published) {
782
- asObject.published = `${Date.now()}`;
28
+ asObject.published = new Date().toISOString();
783
29
  }
784
30
  this.events.emit(code, asObject);
785
31
  }
786
32
  __generalError(nick, content) {
787
33
  return {
788
- context: "irc",
34
+ "@context": this.contexts,
789
35
  type: "update",
790
36
  actor: {
791
37
  type: "person",
@@ -801,7 +47,7 @@ class ASEmitter {
801
47
  }
802
48
  presence(nick, role, channel) {
803
49
  this.emitEvent(EVENT_INCOMING, {
804
- context: "irc",
50
+ "@context": this.contexts,
805
51
  type: "update",
806
52
  actor: {
807
53
  type: "person",
@@ -810,7 +56,7 @@ class ASEmitter {
810
56
  },
811
57
  target: {
812
58
  type: "room",
813
- id: `${this.server}/${channel}`,
59
+ id: `${channel}@${this.server}`,
814
60
  name: channel
815
61
  },
816
62
  object: {
@@ -819,9 +65,30 @@ class ASEmitter {
819
65
  }
820
66
  });
821
67
  }
68
+ attendance(channel, nick, members, roles) {
69
+ this.emitEvent(EVENT_INCOMING, {
70
+ "@context": this.contexts,
71
+ type: "query",
72
+ actor: {
73
+ type: "room",
74
+ id: `${channel}@${this.server}`,
75
+ name: channel
76
+ },
77
+ target: {
78
+ type: "person",
79
+ id: `${nick}@${this.server}`,
80
+ name: nick
81
+ },
82
+ object: {
83
+ type: "attendance",
84
+ members,
85
+ roles
86
+ }
87
+ });
88
+ }
822
89
  channelError(channel, nick, content) {
823
90
  this.emitEvent(EVENT_ERROR, {
824
- context: "irc",
91
+ "@context": this.contexts,
825
92
  type: "update",
826
93
  actor: {
827
94
  type: "person",
@@ -829,7 +96,7 @@ class ASEmitter {
829
96
  },
830
97
  target: {
831
98
  type: "room",
832
- id: `${this.server}/${channel}`
99
+ id: `${channel}@${this.server}`
833
100
  },
834
101
  error: content
835
102
  });
@@ -837,9 +104,14 @@ class ASEmitter {
837
104
  nickError(nick, content) {
838
105
  this.emitEvent(EVENT_ERROR, this.__generalError(nick, content));
839
106
  }
840
- notice(nick, content) {
107
+ notice(nick, content, from) {
108
+ const ctcp = parseCtcp(content);
109
+ if (ctcp) {
110
+ this.ctcp("reply", from, nick, ctcp);
111
+ return;
112
+ }
841
113
  this.emitEvent(EVENT_INCOMING, {
842
- context: "irc",
114
+ "@context": this.contexts,
843
115
  type: "send",
844
116
  actor: {
845
117
  type: "service",
@@ -861,7 +133,7 @@ class ASEmitter {
861
133
  }
862
134
  joinError(nick) {
863
135
  this.emitEvent(EVENT_ERROR, {
864
- context: "irc",
136
+ "@context": this.contexts,
865
137
  type: "join",
866
138
  actor: {
867
139
  id: this.server,
@@ -876,7 +148,7 @@ class ASEmitter {
876
148
  }
877
149
  topicChange(channel, nick, content) {
878
150
  this.emitEvent(EVENT_INCOMING, {
879
- context: "irc",
151
+ "@context": this.contexts,
880
152
  type: "update",
881
153
  actor: {
882
154
  type: "person",
@@ -885,7 +157,7 @@ class ASEmitter {
885
157
  },
886
158
  target: {
887
159
  type: "room",
888
- id: `${this.server}/${channel}`,
160
+ id: `${channel}@${this.server}`,
889
161
  name: channel
890
162
  },
891
163
  object: {
@@ -896,7 +168,7 @@ class ASEmitter {
896
168
  }
897
169
  joinRoom(channel, nick) {
898
170
  this.emitEvent(EVENT_INCOMING, {
899
- context: "irc",
171
+ "@context": this.contexts,
900
172
  type: "join",
901
173
  actor: {
902
174
  type: "person",
@@ -905,14 +177,14 @@ class ASEmitter {
905
177
  },
906
178
  target: {
907
179
  type: "room",
908
- id: `${this.server}/${channel}`,
180
+ id: `${channel}@${this.server}`,
909
181
  name: channel
910
182
  }
911
183
  });
912
184
  }
913
185
  userQuit(nick) {
914
186
  this.emitEvent(EVENT_INCOMING, {
915
- context: "irc",
187
+ "@context": this.contexts,
916
188
  type: "leave",
917
189
  actor: {
918
190
  type: "person",
@@ -931,7 +203,7 @@ class ASEmitter {
931
203
  }
932
204
  userPart(channel, nick) {
933
205
  this.emitEvent(EVENT_INCOMING, {
934
- context: "irc",
206
+ "@context": this.contexts,
935
207
  type: "leave",
936
208
  actor: {
937
209
  type: "person",
@@ -940,7 +212,7 @@ class ASEmitter {
940
212
  },
941
213
  target: {
942
214
  type: "room",
943
- id: `${this.server}/${channel}`,
215
+ id: `${channel}@${this.server}`,
944
216
  name: channel
945
217
  },
946
218
  object: {
@@ -952,15 +224,19 @@ class ASEmitter {
952
224
  privMsg(nick, target, content) {
953
225
  let type;
954
226
  let message;
955
- if (content.startsWith("+\x01ACTION ")) {
227
+ const ctcp = parseCtcp(content);
228
+ if (ctcp?.command === "ACTION") {
956
229
  type = "me";
957
- message = content.split(/^\+\u0001ACTION\s+/)[1].split(/\u0001$/)[0];
230
+ message = ctcp.args;
231
+ } else if (ctcp) {
232
+ this.ctcp("request", nick, target, ctcp);
233
+ return;
958
234
  } else {
959
235
  type = "message";
960
236
  message = content;
961
237
  }
962
238
  this.emitEvent(EVENT_INCOMING, {
963
- context: "irc",
239
+ "@context": this.contexts,
964
240
  type: "send",
965
241
  actor: {
966
242
  type: "person",
@@ -969,7 +245,7 @@ class ASEmitter {
969
245
  },
970
246
  target: {
971
247
  type: target.startsWith("#") ? "room" : "person",
972
- id: `${this.server}/${target}`,
248
+ id: `${target}@${this.server}`,
973
249
  name: target
974
250
  },
975
251
  object: {
@@ -978,9 +254,18 @@ class ASEmitter {
978
254
  }
979
255
  });
980
256
  }
257
+ ctcp(kind, from, target, { command, args }) {
258
+ this.events.emit(EVENT_CTCP, {
259
+ kind,
260
+ command,
261
+ args,
262
+ from,
263
+ target
264
+ });
265
+ }
981
266
  role(type, nick, target, role, channel) {
982
267
  this.emitEvent(EVENT_INCOMING, {
983
- context: "irc",
268
+ "@context": this.contexts,
984
269
  type,
985
270
  actor: {
986
271
  type: "person",
@@ -1001,7 +286,7 @@ class ASEmitter {
1001
286
  },
1002
287
  object: {
1003
288
  type: "room",
1004
- id: `${this.server}/${channel}`,
289
+ id: `${channel}@${this.server}`,
1005
290
  name: channel
1006
291
  }
1007
292
  }
@@ -1009,7 +294,7 @@ class ASEmitter {
1009
294
  }
1010
295
  nickChange(nick, content) {
1011
296
  this.emitEvent(EVENT_INCOMING, {
1012
- context: "irc",
297
+ "@context": this.contexts,
1013
298
  type: "update",
1014
299
  actor: {
1015
300
  type: "person",
@@ -1029,15 +314,17 @@ class ASEmitter {
1029
314
  }
1030
315
 
1031
316
  // src/index.js
1032
- var log = import_debug.default("irc2as");
1033
317
  var EVENT_INCOMING2 = "incoming";
1034
318
  var EVENT_PONG = "pong";
1035
319
  var EVENT_PING = "ping";
1036
320
  var EVENT_UNPROCESSED = "unprocessed";
321
+ var ERR_NO_NICK_GIVEN = "431";
1037
322
  var ERR_BAD_NICK = "432";
1038
323
  var ERR_CHAN_PRIVS = "482";
1039
324
  var ERR_NICK_IN_USE = "433";
325
+ var ERR_NICK_COLLISION = "436";
1040
326
  var ERR_TEMP_UNAVAIL = "437";
327
+ var ERR_NICK_TOO_FAST = "438";
1041
328
  var ERR_NO_CHANNEL = "403";
1042
329
  var ERR_NOT_INVITED = "471";
1043
330
  var ERR_BADMODE = "472";
@@ -1048,10 +335,17 @@ var ERR_BADMASK = "476";
1048
335
  var ERR_NOCHANMODES = "477";
1049
336
  var ERR_BANLISTFULL = "478";
1050
337
  var JOIN = "JOIN";
338
+ var LIST_START = "321";
339
+ var LIST = "322";
340
+ var LIST_END = "323";
341
+ var RPL_ISUPPORT = "005";
342
+ var DEFAULT_CHANTYPES = "#&";
343
+ var LIST_MAX_ITEMS = 5000;
1051
344
  var MODE = "MODE";
1052
345
  var MOTD = "372";
1053
346
  var MOTD_END = "376";
1054
347
  var NAMES = "353";
348
+ var NAMES_END = "366";
1055
349
  var NICK = "NICK";
1056
350
  var NOTICE = "NOTICE";
1057
351
  var PART = "PART";
@@ -1064,10 +358,13 @@ var TOPIC_IS = "332";
1064
358
  var TOPIC_SET_BY = "333";
1065
359
  var WHO = "352";
1066
360
  var WHO_OLD = "354";
1067
- var ROLE = {
361
+ var NICK_PREFIXES = /^[~&@%+!*]+/;
362
+ var PREFIX_ROLE = {
363
+ "~": "owner",
364
+ "&": "owner",
1068
365
  "@": "owner",
1069
366
  "%": "admin",
1070
- "*": "participant"
367
+ "+": "participant"
1071
368
  };
1072
369
  var MODES = {
1073
370
  o: "owner",
@@ -1077,38 +374,77 @@ var MODES = {
1077
374
  function getNickFromServer(server) {
1078
375
  return server.split(/^:/)[1].split("!")[0];
1079
376
  }
377
+ function trailingParam(content, positional) {
378
+ return content !== undefined ? content : positional;
379
+ }
380
+ function isChannelName(channelName, chantypes) {
381
+ if (typeof channelName !== "string" || channelName.length < 2) {
382
+ return false;
383
+ }
384
+ const prefix = channelName[0];
385
+ if (!chantypes.includes(prefix)) {
386
+ return false;
387
+ }
388
+ const body = channelName.slice(1);
389
+ if (body.length === 0 || /\s/.test(channelName)) {
390
+ return false;
391
+ }
392
+ return true;
393
+ }
394
+ function parseIsupportChantypes(pos2, pos3, msg) {
395
+ const tokens = [pos2, pos3, ...msg];
396
+ for (const token of tokens) {
397
+ if (typeof token !== "string" || token.startsWith(":")) {
398
+ break;
399
+ }
400
+ const eq = token.indexOf("=");
401
+ if (eq === -1) {
402
+ continue;
403
+ }
404
+ const key = token.slice(0, eq);
405
+ const value = token.slice(eq + 1);
406
+ if (key === "CHANTYPES") {
407
+ return value.length > 0 ? value : DEFAULT_CHANTYPES;
408
+ }
409
+ }
410
+ return;
411
+ }
1080
412
 
1081
413
  class IrcToActivityStreams {
1082
414
  constructor(cfg) {
1083
415
  const config = cfg || {};
1084
416
  this.server = config.server;
417
+ if (!Array.isArray(config.contexts) || config.contexts.length === 0) {
418
+ throw new Error("IrcToActivityStreams requires a non-empty contexts array");
419
+ }
420
+ this.contexts = [...config.contexts];
1085
421
  this.events = new events.EventEmitter;
422
+ this.chantypes = DEFAULT_CHANTYPES;
1086
423
  this.__buffer = {};
1087
424
  this.__buffer[NAMES] = {};
425
+ this.__listTruncated = false;
1088
426
  }
1089
427
  input(payload) {
1090
- log(payload);
1091
428
  if (typeof payload !== "string") {
1092
- log("unable to process incoming message as it was not a string.");
1093
429
  return false;
1094
430
  }
1095
431
  if (payload.length < 3) {
1096
- log("unable to process incoming string, length smaller than 3.");
1097
432
  return false;
1098
433
  }
1099
434
  const incoming = payload.trim();
1100
- const [metadata, content] = incoming.split(" :");
435
+ const colonAt = incoming.indexOf(" :");
436
+ const metadata = colonAt === -1 ? incoming : incoming.slice(0, colonAt);
437
+ const content = colonAt === -1 ? undefined : incoming.slice(colonAt + 2);
1101
438
  const [server, code, pos1, pos2, pos3, ...msg] = metadata.split(" ");
1102
439
  const channel = typeof pos1 === "string" && pos1.startsWith("#") ? pos1 : typeof pos2 === "string" && pos2.startsWith("#") ? pos2 : typeof pos3 === "string" && pos3.startsWith("#") ? pos3 : undefined;
1103
440
  if (metadata === PING) {
1104
441
  this.events.emit(EVENT_PING, `${Date.now()}`);
1105
442
  return true;
1106
443
  }
1107
- log(`[${code}] server: ${server} channel: ${channel} 1: ${pos1}, 2: ${pos2}, 3: ${pos3}. content: `, content);
1108
444
  this.__processIRCCodes(code, server, channel, pos1, pos2, pos3, content, msg, incoming);
1109
445
  }
1110
446
  __processIRCCodes(code, server, channel, pos1, pos2, pos3, content, msg, incoming) {
1111
- const ase = new ASEmitter(this.events, this.server);
447
+ const ase = new ASEmitter(this.events, this.server, this.contexts);
1112
448
  let nick;
1113
449
  let type;
1114
450
  let role;
@@ -1126,7 +462,12 @@ class IrcToActivityStreams {
1126
462
  break;
1127
463
  case ERR_NICK_IN_USE:
1128
464
  case ERR_BAD_NICK:
1129
- ase.serviceError(pos2, content);
465
+ case ERR_NICK_COLLISION:
466
+ case ERR_NICK_TOO_FAST:
467
+ ase.serviceError(pos2, trailingParam(content, pos3));
468
+ break;
469
+ case ERR_NO_NICK_GIVEN:
470
+ ase.serviceError(pos1, trailingParam(content, pos2));
1130
471
  break;
1131
472
  case ERR_NO_CHANNEL:
1132
473
  ase.joinError(pos2);
@@ -1134,9 +475,66 @@ class IrcToActivityStreams {
1134
475
  case ERR_TEMP_UNAVAIL:
1135
476
  ase.nickError(pos2, content);
1136
477
  break;
1137
- case JOIN:
1138
- ase.joinRoom(channel, getNickFromServer(server));
478
+ case JOIN: {
479
+ const joined = channel || (typeof content === "string" && /^#[^\s,]+$/.test(content) ? content : undefined);
480
+ ase.joinRoom(joined, getNickFromServer(server));
481
+ break;
482
+ }
483
+ case RPL_ISUPPORT: {
484
+ const chantypes = parseIsupportChantypes(pos2, pos3, msg);
485
+ if (chantypes !== undefined) {
486
+ this.chantypes = chantypes;
487
+ }
1139
488
  break;
489
+ }
490
+ case LIST_START:
491
+ this.__buffer[LIST] = [];
492
+ this.__listTruncated = false;
493
+ break;
494
+ case LIST: {
495
+ if (!this.__buffer[LIST]) {
496
+ this.__buffer[LIST] = [];
497
+ }
498
+ if (!isChannelName(pos2, this.chantypes)) {
499
+ break;
500
+ }
501
+ const id = `${pos2}@${this.server}`;
502
+ if (this.__buffer[LIST].length >= LIST_MAX_ITEMS) {
503
+ this.__listTruncated = true;
504
+ break;
505
+ }
506
+ const summary = trailingParam(content, msg[msg.length - 1]);
507
+ this.__buffer[LIST].push({
508
+ type: "room",
509
+ id,
510
+ name: pos2,
511
+ members: Number.parseInt(pos3, 10) || 0,
512
+ summary: typeof summary === "string" ? summary : ""
513
+ });
514
+ break;
515
+ }
516
+ case LIST_END: {
517
+ const listObject = {
518
+ type: "channels",
519
+ items: this.__buffer[LIST] ?? []
520
+ };
521
+ if (this.__listTruncated) {
522
+ listObject.truncated = true;
523
+ }
524
+ ase.emitEvent(EVENT_INCOMING2, {
525
+ "@context": this.contexts,
526
+ type: "query",
527
+ actor: {
528
+ type: "service",
529
+ id: this.server,
530
+ name: this.server
531
+ },
532
+ object: listObject
533
+ });
534
+ delete this.__buffer[LIST];
535
+ this.__listTruncated = false;
536
+ break;
537
+ }
1140
538
  case MODE: {
1141
539
  const user_mode = pos2 || content;
1142
540
  if (!channel) {
@@ -1156,7 +554,7 @@ class IrcToActivityStreams {
1156
554
  case MOTD:
1157
555
  if (!this.__buffer[MOTD]) {
1158
556
  this.__buffer[MOTD] = {
1159
- context: "irc",
557
+ "@context": this.contexts,
1160
558
  type: "update",
1161
559
  actor: {
1162
560
  type: "service",
@@ -1165,11 +563,11 @@ class IrcToActivityStreams {
1165
563
  },
1166
564
  object: {
1167
565
  type: "topic",
1168
- content
566
+ content: trailingParam(content, pos2)
1169
567
  }
1170
568
  };
1171
569
  } else {
1172
- this.__buffer[MOTD].object.content += ` ${content}`;
570
+ this.__buffer[MOTD].object.content += ` ${trailingParam(content, pos2)}`;
1173
571
  }
1174
572
  break;
1175
573
  case MOTD_END:
@@ -1179,22 +577,51 @@ class IrcToActivityStreams {
1179
577
  ase.emitEvent(EVENT_INCOMING2, this.__buffer[MOTD]);
1180
578
  delete this.__buffer[MOTD];
1181
579
  break;
1182
- case NAMES:
1183
- for (const entry of content.split(" ")) {
1184
- role = "member";
1185
- let username = entry;
1186
- if (ROLE[entry[0]]) {
1187
- username = entry.substr(1);
1188
- role = ROLE[entry[0]];
580
+ case NAMES: {
581
+ if (!channel) {
582
+ break;
583
+ }
584
+ const names = trailingParam(content, msg.join(" "));
585
+ if (typeof names !== "string" || names.length === 0) {
586
+ break;
587
+ }
588
+ const list = this.__buffer[NAMES][channel] || {
589
+ members: [],
590
+ roles: []
591
+ };
592
+ for (const entry of names.split(" ")) {
593
+ const nick = entry.replace(NICK_PREFIXES, "");
594
+ if (!nick) {
595
+ continue;
596
+ }
597
+ list.members.push(nick);
598
+ for (const prefix of entry.slice(0, -nick.length)) {
599
+ if (PREFIX_ROLE[prefix]) {
600
+ list.roles.push([nick, PREFIX_ROLE[prefix]]);
601
+ break;
602
+ }
1189
603
  }
1190
- ase.presence(username, role, channel);
1191
604
  }
605
+ this.__buffer[NAMES][channel] = list;
606
+ break;
607
+ }
608
+ case NAMES_END: {
609
+ if (!channel) {
610
+ break;
611
+ }
612
+ const list = this.__buffer[NAMES][channel] || {
613
+ members: [],
614
+ roles: []
615
+ };
616
+ ase.attendance(channel, pos1, list.members, Object.fromEntries(list.roles));
617
+ delete this.__buffer[NAMES][channel];
1192
618
  break;
619
+ }
1193
620
  case NICK:
1194
- ase.nickChange(getNickFromServer(server), content);
621
+ ase.nickChange(getNickFromServer(server), trailingParam(content, pos1));
1195
622
  break;
1196
623
  case NOTICE:
1197
- ase.notice(pos1, content);
624
+ ase.notice(pos1, trailingParam(content, pos2), getNickFromServer(server));
1198
625
  break;
1199
626
  case PART:
1200
627
  ase.userPart(channel, getNickFromServer(server));
@@ -1203,31 +630,31 @@ class IrcToActivityStreams {
1203
630
  this.events.emit(EVENT_PONG, `${Date.now()}`);
1204
631
  break;
1205
632
  case PRIVMSG:
1206
- ase.privMsg(getNickFromServer(server), pos1, content);
633
+ ase.privMsg(getNickFromServer(server), pos1, trailingParam(content, pos2));
1207
634
  break;
1208
635
  case QUIT:
1209
636
  ase.userQuit(getNickFromServer(server));
1210
637
  break;
1211
638
  case TOPIC_CHANGE:
1212
- ase.topicChange(channel, getNickFromServer(server), content);
639
+ ase.topicChange(channel, getNickFromServer(server), trailingParam(content, pos2));
1213
640
  break;
1214
641
  case TOPIC_IS:
1215
642
  this.__buffer[TOPIC_IS] = {
1216
- context: "irc",
643
+ "@context": this.contexts,
1217
644
  type: "update",
1218
645
  actor: undefined,
1219
646
  target: {
1220
647
  type: "room",
1221
- id: `${this.server}/${channel}`,
648
+ id: `${channel}@${this.server}`,
1222
649
  name: channel
1223
650
  },
1224
651
  object: {
1225
652
  type: "topic",
1226
- content
653
+ content: trailingParam(content, pos3)
1227
654
  }
1228
655
  };
1229
656
  break;
1230
- case TOPIC_SET_BY:
657
+ case TOPIC_SET_BY: {
1231
658
  if (!this.__buffer[TOPIC_IS]) {
1232
659
  break;
1233
660
  }
@@ -1237,10 +664,14 @@ class IrcToActivityStreams {
1237
664
  id: `${nick}@${this.server}`,
1238
665
  name: nick
1239
666
  };
1240
- this.__buffer[TOPIC_IS].published = msg[0];
667
+ const topicSetEpochSeconds = Number.parseInt(msg[0], 10);
668
+ if (Number.isFinite(topicSetEpochSeconds)) {
669
+ this.__buffer[TOPIC_IS].published = new Date(topicSetEpochSeconds * 1000).toISOString();
670
+ }
1241
671
  ase.emitEvent(EVENT_INCOMING2, this.__buffer[TOPIC_IS]);
1242
672
  delete this.__buffer[TOPIC_IS];
1243
673
  break;
674
+ }
1244
675
  case WHO:
1245
676
  case WHO_OLD:
1246
677
  nick = msg[3].length <= 2 ? msg[2] : msg[3];
@@ -1257,7 +688,8 @@ class IrcToActivityStreams {
1257
688
  }
1258
689
  }
1259
690
  export {
1260
- IrcToActivityStreams
691
+ IrcToActivityStreams,
692
+ LIST_MAX_ITEMS
1261
693
  };
1262
694
 
1263
- //# debugId=EF561318CD0E9A7D64756E2164756E21
695
+ //# debugId=C9958D3F7FB2933064756E2164756E21