net-irc2 0.0.12 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/examples/echo_bot_celluloid.rb +8 -2
- data/lib/net/irc/client.rb +1 -1
- data/lib/net/irc.rb +1 -1
- data/spec/spec.opts +1 -0
- data/spec/spec_helper.rb +5 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9c880ae74f804231de27b0eaf078a065d747a01
|
4
|
+
data.tar.gz: cc36017322c81c800aa781fa79b86f580e886dd5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ed071dec01dd0c75233a35cd2e9503f8d60b684c83aa1d65f84514c61a198cdbe3a630028b0464575c5842379f786e0bbd8d406badddda96b0dff482000e5b8
|
7
|
+
data.tar.gz: ad1d07c194ae0f7ec729fdd66b95308d65018f7f3dbcb6e65dccf36c8d57eba26412187ec402940943c44a5227daac82600190c3151f92df01d3ab17079b65d4
|
@@ -13,6 +13,12 @@ require 'celluloid/io'
|
|
13
13
|
|
14
14
|
class EchoBot < Net::IRC::Client
|
15
15
|
include Celluloid::IO
|
16
|
+
def initialize(addr,port,opt)
|
17
|
+
opt[:tcp_socket] = Celluloid::IO::TCPSocket
|
18
|
+
super
|
19
|
+
start
|
20
|
+
end
|
21
|
+
|
16
22
|
def on_rpl_welcome(m)
|
17
23
|
post JOIN, "#demo"
|
18
24
|
super
|
@@ -24,10 +30,10 @@ class EchoBot < Net::IRC::Client
|
|
24
30
|
end
|
25
31
|
|
26
32
|
|
27
|
-
supervisor = EchoBot.supervise_as :echo_bot, "
|
33
|
+
supervisor = EchoBot.supervise_as :echo_bot, "188.40.141.208", "6667", {
|
28
34
|
:nick => "foo",
|
29
35
|
:user => "foo",
|
30
36
|
:real => "foobartest",
|
31
37
|
}
|
32
|
-
|
38
|
+
|
33
39
|
sleep
|
data/lib/net/irc/client.rb
CHANGED
@@ -24,7 +24,7 @@ class Net::IRC::Client
|
|
24
24
|
def start
|
25
25
|
# reset config
|
26
26
|
@server_config = Message::ServerConfig.new
|
27
|
-
@socket = TCPSocket.new(@host, @port)
|
27
|
+
@socket = (@opts.tcp_socket || TCPSocket).new(@host, @port)
|
28
28
|
on_connected
|
29
29
|
post PASS, @opts.pass if @opts.pass
|
30
30
|
post NICK, @opts.nick
|
data/lib/net/irc.rb
CHANGED
data/spec/spec.opts
CHANGED
data/spec/spec_helper.rb
ADDED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: net-irc2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcin Łabanowski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: buftok
|
@@ -96,6 +96,7 @@ files:
|
|
96
96
|
- spec/modeparser_spec.rb
|
97
97
|
- spec/net-irc_spec.rb
|
98
98
|
- spec/channel_manager_spec.rb
|
99
|
+
- spec/spec_helper.rb
|
99
100
|
- lib/net/irc/client/channel_manager.rb
|
100
101
|
- lib/net/irc/message/modeparser.rb
|
101
102
|
- lib/net/irc/message/serverconfig.rb
|