fluent-plugin-irc 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -4,7 +4,7 @@ Fluent plugin to send messages to IRC server
4
4
 
5
5
  ## Installation
6
6
 
7
- `$ fluent-gem install fluent-plugin-mongo`
7
+ `$ fluent-gem install fluent-plugin-irc`
8
8
 
9
9
  ## Configuration
10
10
 
@@ -29,31 +29,23 @@ Fluent plugin to send messages to IRC server
29
29
 
30
30
  ### Parameter
31
31
 
32
- * host
33
- * IRC server host
34
- * port
35
- * IRC server port number
36
- * channel
37
- * channel to send messages (without first '#')
38
- * nick
39
- * nickname registerd of IRC
40
- * user
41
- * user name registerd of IRC
42
- * real
43
- * real name registerd of IRC
44
- * message
45
- * message format. %s will be replaced with value specified by out_keys
46
- * out_keys
47
- * keys used to format messages
48
- * time_key
49
- * key name for time
50
- * time_format
51
- * time format. This will be formatted with Time#strftime.
52
- * tag_key
53
- * key name for tag
32
+ |parameter|description|
33
+ |---|---|
34
+ |host|IRC server host|
35
+ |port|IRC server port number|
36
+ |channel|channel to send messages (without first '#')|
37
+ |nick|nickname registerd of IRC|
38
+ |user|user name registerd of IRC|
39
+ |real|real name registerd of IRC|
40
+ |message|message format. %s will be replaced with value specified by out_keys|
41
+ |out_keys|keys used to format messages|
42
+ |time_key|key name for time|
43
+ |time_format|time format. This will be formatted with Time#strftime.|
44
+ |tag_key|key name for tag|
54
45
 
55
46
  ## Copyright
56
- * Copyright
57
- * Copyright (c) 2012 OKUNO Akihiro
58
- * License
59
- * Apache License, Version 2.0
47
+
48
+ <table>
49
+ <tr><td>Copyright</td><td>Copyright (c) 2012 OKUNO Akihiro</td></tr>
50
+ <tr><td>License</td><td>Apache License, Version 2.0</td></tr>
51
+ </table>
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "fluent-plugin-irc"
6
- s.version = "0.0.1"
6
+ s.version = "0.0.2"
7
7
  s.authors = ["OKUNO Akihiro"]
8
8
  s.email = ["okuno.akihiro@gmail.com"]
9
9
  s.homepage = "https://github.com/choplin/fluent-plugin-irc"
@@ -14,6 +14,7 @@ module Fluent
14
14
  config_param :nick , :string , :default => 'fluentd'
15
15
  config_param :user , :string , :default => 'fluentd'
16
16
  config_param :real , :string , :default => 'fluentd'
17
+ config_param :password , :string , :default => nil
17
18
  config_param :message , :string
18
19
  config_param :out_keys do |val|
19
20
  val.split(',')
@@ -49,6 +50,7 @@ module Fluent
49
50
  @client.nick = @nick
50
51
  @client.user = @user
51
52
  @client.real = @real
53
+ @client.password = @password
52
54
  @client.attach(Coolio::Loop.default)
53
55
  end
54
56
 
@@ -76,9 +78,15 @@ module Fluent
76
78
  end
77
79
 
78
80
  class IRCConnection < Cool.io::TCPSocket
79
- attr_accessor :channel, :nick, :user, :real
81
+ attr_accessor :channel, :nick, :user, :real, :password
80
82
 
81
83
  def on_connect
84
+ if @password
85
+ IRCParser.message(:pass) do |m|
86
+ m.password = @password
87
+ write m
88
+ end
89
+ end
82
90
  IRCParser.message(:nick) do |m|
83
91
  m.nick = @nick
84
92
  write m
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-irc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-27 00:00:00.000000000 Z
12
+ date: 2013-04-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fluentd
@@ -87,3 +87,4 @@ summary: Output plugin for IRC
87
87
  test_files:
88
88
  - test/helper.rb
89
89
  - test/plugin/test_out_irc.rb
90
+ has_rdoc: