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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9b624334737b721f47625f3cc950fd7a8515c477
4
- data.tar.gz: fea9f9075bfeb39d3a146f4d2a5e002afe8174c1
3
+ metadata.gz: a2633b6b5cc955fba7d379cdfd86f6fbfb3b954f
4
+ data.tar.gz: 86c7b5cedbf4ee9f97efd65580b0b00f8bb59f39
5
5
  SHA512:
6
- metadata.gz: 0b1e9c7131068b6d72f8782fd990aee42fc3e619df31625d4ec94d89d6bf6fde10c70a41bf6d6e76d4d90c677b440a675946a0580f4680d4f632d5af362e154a
7
- data.tar.gz: c15c9953ef3f3c2ca23f7062e3a61f75c55487f6d781197ecbf1e674b3c94f6901f59b442106de8832104f54ed81a3cb04ebee3efd70c47f22ec63a782fadda6
6
+ metadata.gz: bd6a9bd936e44ed4b834b83d1a45d1e1c1c7a330491a2302ac9930f6142ceff32117b29fbe8a71267a7c79305b284d3997c3995da85b945c420e6347dfe33823
7
+ data.tar.gz: 4c0164dc24f398b4fa0fef4fee3351e1a81158da73cfa478a7b91772b0579a5f1f301c45e9e695c88236d4772a7a808028933b785f6c18ac3185f081d063c53a
@@ -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.2"
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.
@@ -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.
@@ -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.
@@ -53,6 +53,7 @@ module Blur
53
53
  # local.
54
54
  def unbind
55
55
  @connected = false
56
+ @network.disconnected!
56
57
 
57
58
  super
58
59
  end
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.2.1
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-06-02 00:00:00.000000000 Z
11
+ date: 2013-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: majic