Christian Fraß commited on 2021-11-20 19:05:33
Zeige 1 geänderte Dateien mit 51 Einfügungen und 0 Löschungen.
... | ... |
@@ -228,6 +228,44 @@ async function execute |
228 | 228 |
} |
229 | 229 |
); |
230 | 230 |
client.addListener |
231 |
+ ( |
|
232 |
+ "selfMessage", |
|
233 |
+ (to, text) => |
|
234 |
+ { |
|
235 |
+ if (to.charAt(0) === "#") |
|
236 |
+ { |
|
237 |
+ connection.eventqueue.push |
|
238 |
+ ({ |
|
239 |
+ "timestamp": get_timestamp(), |
|
240 |
+ "kind": "message_channel", |
|
241 |
+ "data": {"channel": to, "sender": null, "content": text} |
|
242 |
+ }); |
|
243 |
+ } |
|
244 |
+ else |
|
245 |
+ { |
|
246 |
+ connection.eventqueue.push |
|
247 |
+ ({ |
|
248 |
+ "timestamp": get_timestamp(), |
|
249 |
+ "kind": "message_query", |
|
250 |
+ "data": {"user_name": to, "sender": null, "content": text} |
|
251 |
+ }); |
|
252 |
+ } |
|
253 |
+ } |
|
254 |
+ ); |
|
255 |
+ client.addListener |
|
256 |
+ ( |
|
257 |
+ "topic", |
|
258 |
+ (channel, topic, nick, message) => |
|
259 |
+ { |
|
260 |
+ connection.eventqueue.push |
|
261 |
+ ({ |
|
262 |
+ "timestamp": get_timestamp(), |
|
263 |
+ "kind": "topic", |
|
264 |
+ "data": {"channel": channel, "content": topic} |
|
265 |
+ }); |
|
266 |
+ } |
|
267 |
+ ); |
|
268 |
+ client.addListener |
|
231 | 269 |
( |
232 | 270 |
"names", |
233 | 271 |
(channel, users) => |
... | ... |
@@ -241,6 +279,19 @@ async function execute |
241 | 279 |
} |
242 | 280 |
); |
243 | 281 |
client.addListener |
282 |
+ ( |
|
283 |
+ "nick", |
|
284 |
+ (oldnick, newnick, channels, message) => |
|
285 |
+ { |
|
286 |
+ connection.eventqueue.push |
|
287 |
+ ({ |
|
288 |
+ "timestamp": get_timestamp(), |
|
289 |
+ "kind": "user_renamed", |
|
290 |
+ "data": {"user_name_old": oldnick, "user_name_to": newnick} |
|
291 |
+ }); |
|
292 |
+ } |
|
293 |
+ ); |
|
294 |
+ client.addListener |
|
244 | 295 |
( |
245 | 296 |
"join", |
246 | 297 |
(channel, nick, message) => |
247 | 298 |