pharaun / Karmator

Rust bot that works on IRC and Slack for tracking karma (upvotes/downvotes...)
BSD 3-Clause "New" or "Revised" License
17 stars 0 forks source link

PRIVMSG split and escaping of unsafe input. #124

Closed pharaun closed 3 years ago

pharaun commented 9 years ago

Should have a sane way to split PRIVMSG into multiple lines and so on, that is line-capped. (the 512 byte limit which includes the sender information. "PRIVMSG foo :bar", cap "nick!user@host PRIVMSG foo :bar\r\n")

Then also probably want to escape unsafe input such as: PRIVMSG #channel :line1\r\nQUIT

Finally to find the exact length of the host/user/nick bit, do a WHOIS of yourself to find out that information. of course you'd need to track host changes (e.g. when activating a cloak later), so you'd want to listen for that message if you don't want to WHOIS yourself every time you send a message

pharaun commented 3 years ago

Irc specific issue.