daioikachan 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/VERSION +1 -1
- data/lib/fluent/plugin/out_irc.rb +10 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63ee532c54d5c3cbcf00169ee3d1b2fb6621c917
|
4
|
+
data.tar.gz: 0d3b4eacfbf125714a467a5544dfd6c50752a225
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c59f72eac8f078a362092ba2ddbebfe52cd28894a4bb772f8782c76b8f95d9e65905fa6493cd18456f478a8ce7cd03bd59f93123569e8ba396ced3c0e3a36657
|
7
|
+
data.tar.gz: 89968e0ddd67d52b3f083c8f0bcca07807f6bb3d983b59068888e9ef7e80097d056fcd1f4d6ad3c59422694634c7e5a8a6cb1c2dd372cbc3b39e137b5a539ef6
|
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.2
|
@@ -232,11 +232,14 @@ module Fluent
|
|
232
232
|
end
|
233
233
|
|
234
234
|
def on_read(data)
|
235
|
+
err_nick_name_in_use = nil
|
235
236
|
data.each_line do |line|
|
236
237
|
begin
|
237
238
|
msg = IRCParser.parse(line)
|
238
239
|
log.debug { "out_irc: on_read :#{msg.class.to_sym}" }
|
239
240
|
case msg.class.to_sym
|
241
|
+
when :rpl_welcome
|
242
|
+
log.info { "out_irc: welcome \"#{msg.nick}\" to \"#{msg.prefix}\"" }
|
240
243
|
when :ping
|
241
244
|
IRCParser.message(:pong) do |m|
|
242
245
|
m.target = msg.target
|
@@ -247,7 +250,9 @@ module Fluent
|
|
247
250
|
log.info { "out_irc: joined to #{msg.channels.join(', ')}" }
|
248
251
|
msg.channels.each {|channel| @joined[channel] = true }
|
249
252
|
when :err_nick_name_in_use
|
250
|
-
log.warn "out_irc: nickname \"#{msg.error_nick}\" is already in use."
|
253
|
+
log.warn "out_irc: nickname \"#{msg.error_nick}\" is already in use. use \"#{msg.error_nick}_\" instead."
|
254
|
+
err_nick_name_in_use = true
|
255
|
+
@nick = "#{msg.error_nick}_"
|
251
256
|
when :error
|
252
257
|
log.warn "out_irc: an error occured. \"#{msg.error_message}\""
|
253
258
|
end
|
@@ -255,6 +260,10 @@ module Fluent
|
|
255
260
|
#TODO
|
256
261
|
end
|
257
262
|
end
|
263
|
+
|
264
|
+
if err_nick_name_in_use
|
265
|
+
self.on_connect
|
266
|
+
end
|
258
267
|
end
|
259
268
|
|
260
269
|
def joined?(channel)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: daioikachan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Naotoshi Seo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|