Commit Diff
Diff:
deee939b86f13061b42fc41d4187dd4d4f8a86ed
0c3e95627a6f16e7468e7ec0a01633355122eb89
Commit:
0c3e95627a6f16e7468e7ec0a01633355122eb89
Tree:
94090cb06ce13bb2bb6a3dd11dbfcd515896f030
Author:
Omar Polo <op@omarpolo.com>
Date:
Sat Jan 8 15:47:06 2022 UTC
Message:
add a safety net: picks up only the first 50 characters of the HTTP title
commit - deee939b86f13061b42fc41d4187dd4d4f8a86ed
commit + 0c3e95627a6f16e7468e7ec0a01633355122eb89
blob - 0f32a038718310378d29fe88c2811aca3466e8a0
blob + ecee4dd688afb8a03ccd28ea8928a58252638d5d
--- main.go
+++ main.go
@@ -144,6 +144,10 @@ func pagetitle(conn *irc.Conn, line *irc.Line) {
continue
}
+ title := stringifyNode(n)
+ if len(title) > 50 {
+ title = title[:50]
+ }
conn.Privmsg(channel, stringifyNode(n))
}
}
Omar Polo