Sha256: fef9a64d1652262e95fe1e24ac7eb37fbd9b94d9fd7d33ea566a8790b759a580
Contents?: true
Size: 653 Bytes
Versions: 2
Compression:
Stored size: 653 Bytes
Contents
module Ring class SQA class Alarm class UDP2IRC def send message, targets=CFG.irc.target url = Paste.add message[:long] [targets].flatten.each do |target| msg = [@password, target, message[:short], url].join ' ' msg += "\0" while msg.size % 16 > 0 UDPSocket.new.send msg, 0, @host, @port.to_i end rescue => error Log.error "UDP2IRC raised '#{error.class}' with message '#{error.message}'" 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ring-sqa-0.0.23 | lib/ring/sqa/alarm/udp2irc.rb |
ring-sqa-0.0.22 | lib/ring/sqa/alarm/udp2irc.rb |