peeping_tom 0.2 → 0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/peeping_tom/notifier/irc.rb +5 -3
- metadata +2 -2
@@ -3,13 +3,15 @@ require 'shout-bot'
|
|
3
3
|
module PeepingTom
|
4
4
|
module Notifier
|
5
5
|
class IRC
|
6
|
-
def initialize(channel_name)
|
6
|
+
def initialize(server_name, port, channel_name)
|
7
|
+
@server_name = server_name
|
8
|
+
@port = port
|
7
9
|
@channel = channel_name
|
8
10
|
end
|
9
11
|
|
10
12
|
def notify!(site)
|
11
13
|
msg = "#{site.name} was tested at #{site.url}, and it's busted. You should look into that."
|
12
|
-
ShoutBot.shout(
|
14
|
+
ShoutBot.shout("irc://PeepingTom@#{@server_name}:#{@port}/#{@channel}") do |channel|
|
13
15
|
channel.say msg
|
14
16
|
end
|
15
17
|
rescue SocketError
|
@@ -17,4 +19,4 @@ module PeepingTom
|
|
17
19
|
end
|
18
20
|
end
|
19
21
|
end
|
20
|
-
end
|
22
|
+
end
|