Pulse 1.3.1.2 → 1.3.2

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.
@@ -6,7 +6,7 @@ module Pulse
6
6
  class Client
7
7
  include Handling
8
8
 
9
- attr_accessor :scripts
9
+ attr_reader :channels, :callbacks, :conversations, :settings, :scripts
10
10
 
11
11
  def initialize options
12
12
  @conversations, @callbacks, @channels, @scripts = {}, {}, {}, []
@@ -28,6 +28,7 @@ module Pulse
28
28
 
29
29
  def got_command command
30
30
  name = :"got_#{command.name.downcase}"
31
+ puts "<< #{command.inspect}"
31
32
 
32
33
  if respond_to? name
33
34
  __send__ name, command
@@ -35,6 +36,8 @@ module Pulse
35
36
  end
36
37
 
37
38
  def connection_established connection
39
+ p @settings.password
40
+ transmit :PASS, @settings.password if @settings.password?
38
41
  transmit :NICK, @settings.nickname
39
42
  transmit :USER, @settings.username, ?*, ?*, @settings.realname
40
43
  end
@@ -76,6 +79,7 @@ module Pulse
76
79
  unload_scripts
77
80
 
78
81
  transmit :QUIT, "Received kill signal (#{signal})"
82
+ @connection.close if @connection.established?
79
83
  end
80
84
 
81
85
  private
@@ -27,6 +27,7 @@ module Pulse
27
27
  @sleeping = false
28
28
  end
29
29
 
30
+ puts ">> #{command.inspect}"
30
31
  @socket.write "#{command}\n"
31
32
  else
32
33
  Thread.stop
@@ -4,7 +4,7 @@ module Pulse
4
4
  class Settings < Hash
5
5
  class Error < StandardError; end
6
6
 
7
- attr_accessor :nickname, :username, :realname, :hostname, :password
7
+ attr_accessor :nickname, :username, :realname, :hostname
8
8
 
9
9
  def initialize options = {}
10
10
  @options = options
@@ -18,5 +18,7 @@ module Pulse
18
18
  def inspect
19
19
  %{#<#{self.class.name} @name=#{@name.inspect} @channel=#{@channel.name.inspect}>}
20
20
  end
21
+
22
+ alias_method :nickname, :name
21
23
  end
22
24
  end
metadata CHANGED
@@ -5,9 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 3
8
- - 1
9
8
  - 2
10
- version: 1.3.1.2
9
+ version: 1.3.2
11
10
  platform: ruby
12
11
  authors:
13
12
  - Mikkel Kroman
@@ -15,7 +14,7 @@ autorequire:
15
14
  bindir: executables
16
15
  cert_chain: []
17
16
 
18
- date: 2010-12-14 00:00:00 +01:00
17
+ date: 2010-12-16 00:00:00 +01:00
19
18
  default_executable:
20
19
  dependencies: []
21
20