ceiling_cat 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,7 +4,8 @@ module CeilingCat
4
4
  def handle
5
5
  if !super && event.type == :chat
6
6
  if match = self.class.list.find{|car| body =~ Regexp.new(car[:call],true) }
7
- if Kernel.rand(10) >= (match[:frequency] || 0)
7
+ frequency = match[:frequency] || 1
8
+ if Kernel.rand(frequency)+1 == frequency
8
9
  response = [match[:response]].flatten # Support old responses which are strings, not arrays
9
10
  reply response[Kernel.rand(response.size)]
10
11
  end
@@ -1,3 +1,3 @@
1
1
  module CeilingCat
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ceiling_cat
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 7
10
- version: 0.1.7
9
+ - 8
10
+ version: 0.1.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Chris Warren
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-05-01 00:00:00 -07:00
18
+ date: 2012-05-03 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency