botbase 0.1.7 → 0.2.0

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: 231780a7e4b9c17fdaec8fcea576eaf9832fefa2
4
- data.tar.gz: a113f2e4f637e2b51c6632ba2d15078ea46d8ced
3
+ metadata.gz: 5a3376d131dd2f7fd14437f20bfcd5715b56a646
4
+ data.tar.gz: ce7bb6b2f91974c946c97388190ad08a74a9d914
5
5
  SHA512:
6
- metadata.gz: fcbb264f013bfee7ee2c7bc6dd1911de566e780e4e41201a858e85beb2c4a50535fdf867e97046063e6f833ff8562468e86bacd1c61a70b1df9cb26a7f022034
7
- data.tar.gz: d0b5a4388d413efcb99f0f0bbd884194da376fe30d673e99e04b38be5f26814180396a8e8572936f0c727f05439a7aa4aab2ff01b899883fb02edaa9409b3564
6
+ metadata.gz: 2a28663cb9cf43a6c5f98202db7c445b538198f3f34049d0555f0cdfc530564cb037815ec333ba497d086943613ce968f1440ec6b6f995ba7afc0c2792c19cb4
7
+ data.tar.gz: 292949c8c503273ab8468e7a947774ea3ce7d84eaef5fd2f5133fd220c32622a3302908f571ee46fcf24c266a9aa53596448199993e6e0f98e15314d93ec72b3
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -3,6 +3,7 @@
3
3
  # file: botbase.rb
4
4
 
5
5
 
6
+ require 'mtlite'
6
7
  require 'simple-config'
7
8
 
8
9
 
@@ -11,8 +12,7 @@ class BotBase
11
12
  attr_reader :log
12
13
 
13
14
 
14
- def initialize(config=nil, botname: 'Nicole', notifier: nil, log: log)
15
-
15
+ def initialize(config=nil, botname: 'Nicole', notifier: nil, log: nil)
16
16
 
17
17
  @botname, @notifier, @log, @h = botname, notifier, log, nil
18
18
 
@@ -46,7 +46,13 @@ class BotBase
46
46
  end
47
47
 
48
48
  if detected then
49
- r
49
+
50
+ if mode == :voicechat then
51
+ MTLite.new(r).to_s.gsub(/ +https:\/\/[\S]+/,'')
52
+ else
53
+ MTLite.new(r).to_html
54
+ end
55
+
50
56
  else
51
57
  ''
52
58
  end
@@ -55,7 +61,7 @@ class BotBase
55
61
 
56
62
  def restart
57
63
 
58
- log.info 'BotBase/restart: restarting ...'
64
+ log.info 'BotBase/restart: restarting ...' if log
59
65
  @modules = initialize_modules(@h[:modules]) if @h
60
66
  notice "echo: #{@botname} is now ready"
61
67
 
@@ -68,9 +74,12 @@ class BotBase
68
74
  modules.inject([]) do |r, m|
69
75
 
70
76
  name, settings = m
77
+ settings = {} if settings.is_a? String
71
78
 
72
- log.info 'BotBase/initialize_modules: ' +
73
- 'initialising botbase-module-' + name.to_s
79
+ if log then
80
+ log.info 'BotBase/initialize_modules: ' +
81
+ 'initialising botbase-module-' + name.to_s
82
+ end
74
83
 
75
84
  klass_name = 'BotBaseModule' + name.to_s
76
85
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: botbase
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,8 +31,28 @@ cert_chain:
31
31
  YxZGLFY3TBqGLKUMyiOYlOa0oKBNAqnib62M7h9nxMt9pixyl6hKzikU6vwApKBU
32
32
  hHWzzAMK8eZsvA==
33
33
  -----END CERTIFICATE-----
34
- date: 2017-10-29 00:00:00.000000000 Z
34
+ date: 2017-11-07 00:00:00.000000000 Z
35
35
  dependencies:
36
+ - !ruby/object:Gem::Dependency
37
+ name: mtlite
38
+ requirement: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - "~>"
41
+ - !ruby/object:Gem::Version
42
+ version: '0.3'
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ version: 0.3.5
46
+ type: :runtime
47
+ prerelease: false
48
+ version_requirements: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - "~>"
51
+ - !ruby/object:Gem::Version
52
+ version: '0.3'
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: 0.3.5
36
56
  - !ruby/object:Gem::Dependency
37
57
  name: simple-config
38
58
  requirement: !ruby/object:Gem::Requirement
metadata.gz.sig CHANGED
Binary file