[add] progation of events "join", "part", "kick", "quit"
Christian Fraß

Christian Fraß commited on 2021-11-20 16:04:23
Zeige 1 geänderte Dateien mit 52 Einfügungen und 0 Löschungen.

... ...
@@ -242,6 +241,58 @@ async function execute
242 241
 					}
243 242
 				);
244 243
 				client.addListener
244
+				(
245
+					"join",
246
+					(channel, nick, message) =>
247
+					{
248
+						connection.eventqueue.push
249
+						({
250
+							"timestamp": get_timestamp(),
251
+							"kind": "user_joined",
252
+							"data": {"channel": channel, "user_name": nick}
253
+						});
254
+					}
255
+				);
256
+				client.addListener
257
+				(
258
+					"part",
259
+					(channel, nick, reason, message) =>
260
+					{
261
+						connection.eventqueue.push
262
+						({
263
+							"timestamp": get_timestamp(),
264
+							"kind": "user_parted",
265
+							"data": {"channel": channel, "user_name": nick}
266
+						});
267
+					}
268
+				);
269
+				client.addListener
270
+				(
271
+					"kick",
272
+					(channel, nick, by, reason, message) =>
273
+					{
274
+						connection.eventqueue.push
275
+						({
276
+							"timestamp": get_timestamp(),
277
+							"kind": "user_kicked",
278
+							"data": {"channel": channel, "user_name": nick, "op_name": by, "reason": reason}
279
+						});
280
+					}
281
+				);
282
+				client.addListener
283
+				(
284
+					"quit",
285
+					(nick, reason, channels, message) =>
286
+					{
287
+						connection.eventqueue.push
288
+						({
289
+							"timestamp": get_timestamp(),
290
+							"kind": "user_quit",
291
+							"data": {"name": nick, "channels": channels}
292
+						});
293
+					}
294
+				);
295
+				client.addListener
245 296
 				(
246 297
 					"error",
247 298
 					(error) =>
248 299