cinch 2.0.0.pre.3 → 2.0.0.pre.4
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.
- data/lib/cinch/channel.rb +4 -4
- data/lib/cinch/helpers.rb +1 -1
- data/lib/cinch/message.rb +5 -5
- data/lib/cinch/version.rb +1 -1
- metadata +1 -1
data/lib/cinch/channel.rb
CHANGED
@@ -44,10 +44,10 @@ module Cinch
|
|
44
44
|
attr_reader :modes
|
45
45
|
synced_attr_reader :modes
|
46
46
|
def initialize(name, bot)
|
47
|
-
@bot
|
48
|
-
@name
|
49
|
-
@users
|
50
|
-
@bans
|
47
|
+
@bot = bot
|
48
|
+
@name = name
|
49
|
+
@users = Hash.new {|h, k| h[k] = []}
|
50
|
+
@bans = []
|
51
51
|
@owners = []
|
52
52
|
|
53
53
|
@modes = {}
|
data/lib/cinch/helpers.rb
CHANGED
@@ -90,7 +90,7 @@ module Cinch
|
|
90
90
|
def Timer(interval, options = {}, &block)
|
91
91
|
options = {:method => :timer, :threaded => true, :interval => interval}.merge(options)
|
92
92
|
block ||= self.method(options[:method])
|
93
|
-
timer
|
93
|
+
timer = Cinch::Timer.new(bot, options, &block)
|
94
94
|
timer.start
|
95
95
|
|
96
96
|
timer
|
data/lib/cinch/message.rb
CHANGED
@@ -66,11 +66,11 @@ module Cinch
|
|
66
66
|
attr_reader :target
|
67
67
|
|
68
68
|
def initialize(msg, bot)
|
69
|
-
@raw
|
70
|
-
@bot
|
69
|
+
@raw = msg
|
70
|
+
@bot = bot
|
71
71
|
@matches = {:ctcp => {}, :action => {}, :other => {}}
|
72
|
-
@events
|
73
|
-
@time
|
72
|
+
@events = []
|
73
|
+
@time = Time.now
|
74
74
|
parse if msg
|
75
75
|
end
|
76
76
|
|
@@ -90,7 +90,7 @@ module Cinch
|
|
90
90
|
|
91
91
|
@user = parse_user
|
92
92
|
@channel = parse_channel
|
93
|
-
@target = @
|
93
|
+
@target = @channel || @user
|
94
94
|
@server = parse_server
|
95
95
|
@error = parse_error
|
96
96
|
@message = parse_message
|
data/lib/cinch/version.rb
CHANGED