blur 1.7.2.1 → 1.7.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/library/blur.rb +1 -1
- data/library/blur/client.rb +5 -0
- data/library/blur/network.rb +8 -3
- data/library/blur/network/connection.rb +1 -0
- 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: a2633b6b5cc955fba7d379cdfd86f6fbfb3b954f
|
4
|
+
data.tar.gz: 86c7b5cedbf4ee9f97efd65580b0b00f8bb59f39
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd6a9bd936e44ed4b834b83d1a45d1e1c1c7a330491a2302ac9930f6142ceff32117b29fbe8a71267a7c79305b284d3997c3995da85b945c420e6347dfe33823
|
7
|
+
data.tar.gz: 4c0164dc24f398b4fa0fef4fee3351e1a81158da73cfa478a7b91772b0579a5f1f301c45e9e695c88236d4772a7a808028933b785f6c18ac3185f081d063c53a
|
data/library/blur.rb
CHANGED
@@ -28,7 +28,7 @@ require 'blur/script/messageparsing'
|
|
28
28
|
# It can be by handlers, scripts, communications, and what have you.
|
29
29
|
module Blur
|
30
30
|
# The major and minor version-values of Blur.
|
31
|
-
Version = "1.7.
|
31
|
+
Version = "1.7.3"
|
32
32
|
|
33
33
|
# Instantiates a client with given options and then makes the client instance
|
34
34
|
# evaluate the given block to form a DSL.
|
data/library/blur/client.rb
CHANGED
@@ -87,6 +87,11 @@ module Blur
|
|
87
87
|
script.unload!
|
88
88
|
end.clear
|
89
89
|
end
|
90
|
+
|
91
|
+
# Called when a network connection is either closed, or terminated.
|
92
|
+
def network_connection_closed network
|
93
|
+
emit :connection_close, network
|
94
|
+
end
|
90
95
|
|
91
96
|
# Try to gracefully disconnect from each network, unload all scripts and
|
92
97
|
# exit properly.
|
data/library/blur/network.rb
CHANGED
@@ -113,13 +113,18 @@ module Blur
|
|
113
113
|
transmit :NICK, @options[:nickname]
|
114
114
|
transmit :USER, @options[:username], :void, :void, @options[:realname]
|
115
115
|
end
|
116
|
+
|
117
|
+
# Called when the connection was closed.
|
118
|
+
def disconnected!
|
119
|
+
@channels.each { |channel| channel.users.clear }
|
120
|
+
@channels.clear
|
121
|
+
|
122
|
+
@delegate.network_connection_closed self
|
123
|
+
end
|
116
124
|
|
117
125
|
# Terminate the connection and clear all channels and users.
|
118
126
|
def disconnect
|
119
127
|
@connection.close_connection_after_writing
|
120
|
-
|
121
|
-
@channels.each { |channel| channel.users.clear }
|
122
|
-
@channels.clear
|
123
128
|
end
|
124
129
|
|
125
130
|
# Transmit a command to the server.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blur
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mikkel Kroman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-08-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: majic
|