Public Access
M1 step 4b: IRC Service on the device; 8-bit frame buffer
- IrcService: networking on its own task, TLS with the built-in CA bundle (or trust-on-first-use pinning when self-signed is allowed), plain TCP when TLS is off; connects only while Wi-Fi is Connected, marks pauses for Monitoring, reconnects with backoff, pings a quiet server, writes Logs, raises Notifications for Mentions - Session: forget /quit once disconnected (it was handled every loop); the server Buffer never counts as unread (MOTD showed as [4]) - Status Bar: unread count - Frame buffer 16 -> 8-bit colour (M1 Q46): min free heap with IRC on TLS went from 51 KB to 79 KB - Serial: irc start / say / dump Verified on the device against irc.libera.chat:6697: certificate checked, joined #roro9stack-test, sent a message, quit cleanly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
This commit is contained in:
@@ -93,7 +93,7 @@ void IrcSession::add(int b, IrcLine::Kind kind, const std::string& nick, const s
|
||||
effects_.logs.push_back({buf.name, line});
|
||||
|
||||
bool fromOthers = kind == IrcLine::Kind::Message || kind == IrcLine::Kind::Action || kind == IrcLine::Kind::Notice;
|
||||
if (b != viewing_ && fromOthers) {
|
||||
if (b != viewing_ && fromOthers && buf.type != IrcBuffer::Type::Server) {
|
||||
buf.unread++;
|
||||
if (mention) {
|
||||
buf.mentioned = true;
|
||||
@@ -114,6 +114,7 @@ void IrcSession::connected(int64_t) {
|
||||
|
||||
void IrcSession::disconnected(int64_t utc, const std::string& reason) {
|
||||
registered_ = false;
|
||||
quit_ = false;
|
||||
rejoin_.clear();
|
||||
for (int i = 0; i < bufferCount(); i++) {
|
||||
if (buffers_[i].type == IrcBuffer::Type::Channel && buffers_[i].joined) rejoin_.push_back(buffers_[i].name);
|
||||
|
||||
Reference in New Issue
Block a user