Sha256: e0ae92869edb5fe886712bcbb288ec15af9ad5495c0b9c654f4b940eb90f7af3

Contents?: true

Size: 454 Bytes

Versions: 1

Compression:

Stored size: 454 Bytes

Contents

module Ring
class SQA
class Alarm

  class UDP2IRC
    def send message, channel=CFG.irc.channel
      msg = [@password, channel, message[:short]].join ' '
      msg += "\0" while msg.size % 16 > 0
      UDPSocket.new.send msg, 0, @host, @port.to_i
    end

    private

    def initialize host=CFG.irc.host, port=CFG.irc.port, password=CFG.irc.password
      @host     = host
      @port     = port
      @password = password
    end
  end

end
end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ring-sqa-0.0.16 lib/ring/sqa/alarm/udp2irc.rb