Sha256: ee9e3c31ab0a876285bbef4cfbf1e2467e1fab1a0d2d422a6aa4d73d1a5cd308

Contents?: true

Size: 549 Bytes

Versions: 2

Compression:

Stored size: 549 Bytes

Contents

class IRC
  class Connection < EventMachine::Connection
    include EventMachine::Protocols::LineText2

    def initialize(server)
      @server = server
    end

    ## EventMachine callbacks
    def post_init
      send_data("USER #{@server.ident || @server.irc.ident} * * :#{@server.realname || @server.irc.realname}\r\n")
      send_data("NICK #{@server.nick || @server.irc.nick}\r\n")
    rescue => e
      p e
    end

    def receive_line(line)
      @server.receive_line(line)
    end

    def unbind
      @server.unbind
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
on_irc-2.1.5 lib/on_irc/connection.rb
on_irc-2.1.4 lib/on_irc/connection.rb