descartes 0.3.3 → 0.3.4

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: 301615292920003d732defd63cb9228af2a11183
4
- data.tar.gz: 058863b9b98c73b713d5e8de084947888266ac70
3
+ metadata.gz: bf39d5c0b4ae298a7ceb8b4226322b29352af050
4
+ data.tar.gz: fdbe7648d95139d7a14b804b4554911d172e07a6
5
5
  SHA512:
6
- metadata.gz: da19ed1933fc604ae075864ec61e6b25353069d862b1ded475ef137f8ad78fe87abe1a1fb854e38de8a02a18728aaca095369e1d25a2cc82c1e7907e66b52ba9
7
- data.tar.gz: ff09d40c16f7ff72398a6ec23cdd4f1de6b84f7272e0ab78d0e5c05fb32182056aa186597f8f9d6999e08758737b2563ecefb6c732f5532ebb34d325b9ee09f3
6
+ metadata.gz: e4fa5e569cf4dc04e5d0e9b10a3cc900faaaba2b72c7c73694dca263727971d10883cc94fd69e3905a47c37a468eac9c63acfe89086e3abc9551ae88c7168d4c
7
+ data.tar.gz: 01aec979d11effa7ca842b235828cdfb67a5802d2bc1865fac0f3a9c86597cfe0b3d65aff0aa0cf65e727edd8faaa40d4d7b8731fd224ff1a62653a17558fa74
data/bin/descartes CHANGED
@@ -14,13 +14,14 @@
14
14
 
15
15
  require 'descartes'
16
16
 
17
- server = ARGV[0] || 'irc.rizon.net'
18
- channels = ARGV[1..-1] || ['#aggvistnurummor']
17
+ nickname = ARGV[0] || 'Descartes'
18
+ server = ARGV[1] || 'irc.rizon.net'
19
+ channels = ARGV[2..-1] || ['#aggvistnurummor']
19
20
  plugins = Descartes.load
20
21
 
21
22
  Cinch::Bot.new {
22
23
  configure do |c|
23
- c.nick = 'Descartes'
24
+ c.nick = nickname
24
25
  c.realname = 'Descartes'
25
26
  c.user = 'Descartes'
26
27
  c.server = server
@@ -0,0 +1,26 @@
1
+ ##
2
+ ## DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
3
+ ## Version 2, December 2004
4
+ ##
5
+ ## Everyone is permitted to copy and distribute verbatim or modified
6
+ ## copies of this license document, and changing it is allowed as long
7
+ ## as the name is changed.
8
+ ##
9
+ ## DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
10
+ ## TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
11
+ ##
12
+ ## 0. You just DO WHAT THE FUCK YOU WANT TO.
13
+ ##
14
+
15
+ class Descartes
16
+ class Reply
17
+ include Cinch::Plugin
18
+
19
+ match /Descartes.*\?/, :use_prefix => false
20
+
21
+ def execute(m)
22
+ replies = [].tap {|ary| File.read('modules/reply/replies.txt').each_line { |line| ary << line } }
23
+ m.reply replies[rand(1..20)]
24
+ end
25
+ end
26
+ end
@@ -14,6 +14,6 @@
14
14
 
15
15
  class Descartes
16
16
  def self.version
17
- '0.3.3'
17
+ '0.3.4'
18
18
  end
19
19
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: descartes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Giovanni Capuano
@@ -77,7 +77,7 @@ files:
77
77
  - lib/descartes/modules/crunchyroll.rb
78
78
  - lib/descartes/modules/currency.rb
79
79
  - lib/descartes/modules/google.rb
80
- - lib/descartes/modules/hi.rb
80
+ - lib/descartes/modules/reply.rb
81
81
  - lib/descartes/modules/rpn.rb
82
82
  - lib/descartes/modules/seen.rb
83
83
  - lib/descartes/modules/shinbo.rb
@@ -1,25 +0,0 @@
1
- ##
2
- # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
3
- # Version 2, December 2004
4
- #
5
- # Everyone is permitted to copy and distribute verbatim or modified
6
- # copies of this license document, and changing it is allowed as long
7
- # as the name is changed.
8
- #
9
- # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
10
- # TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
11
- #
12
- # 0. You just DO WHAT THE FUCK YOU WANT TO.
13
- ##
14
-
15
- class Descartes
16
- class Hi
17
- include Cinch::Plugin
18
-
19
- match 'hello'
20
-
21
- def execute(m)
22
- m.reply "hello, #{m.user.nick}"
23
- end
24
- end
25
- end