1
0
Fork 1
mirror of https://codeberg.org/keyoxide/doipjs.git synced 2025-04-23 23:01:31 -06:00

Make IRC fetcher more abuse-proof by checking the sender's nick

This commit is contained in:
Wiktor Kwapisiewicz 2025-03-24 13:49:21 +01:00
parent a4d7aa7750
commit 9838d8d33e
No known key found for this signature in database

View file

@ -76,6 +76,10 @@ export async function fn (data, opts) {
})
// @ts-ignore
client.addListener('notice', (nick, to, text, message) => {
// ignore notices from users that are not NickServ
if (nick !== 'NickServ') {
return
}
if (reKey.test(text)) {
const match = text.match(reKey)
keys.push(match[1])