Initial commit: extracted from impostor-bbs gems/bbs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-28 22:18:57 +02:00
commit 4690ade510
11 changed files with 583 additions and 0 deletions

22
lib/bbs/session.rb Normal file
View File

@@ -0,0 +1,22 @@
# frozen_string_literal: true
require 'securerandom'
module BBS
class Session
include Telnet
def initialize(client)
@client = client
@session_id = SecureRandom.hex(8)
end
def run
negotiate
flow = BBS.config.flow or raise "BBS.config.flow is not set"
FlowRunner.new(self, @session_id, flow).run
ensure
@client.close rescue nil
end
end
end