descartes 0.6.3 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/descartes/modules/pigro.rb +38 -0
- data/lib/descartes/modules/seen.rb +14 -1
- data/lib/descartes/modules/sindaco.rb +0 -1
- data/lib/descartes/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4d6b0c4e6f44a70599281de1f0eb577d76ad01c
|
4
|
+
data.tar.gz: 246713b26e8a96329b46f93f4f450bb69f0a9389
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b501ef2a1ebfc5af3e6b21a2cb4c50186134cce1172fff673293eaa7344766adcaa2aa04b66ccb990c0857e703c2366b88b167b2402868ff91104ae89ed4b5a
|
7
|
+
data.tar.gz: dd1483e6dfa514f7455fd6a7c7740565937b3e822f73c2065c36e583116dbe6bc964d7e740c4a23324ab9caa9bcb40c314df89d1b1e875b1bcfc015685bb6ea2
|
@@ -18,6 +18,44 @@ class Descartes
|
|
18
18
|
class Pigro
|
19
19
|
include Cinch::Plugin
|
20
20
|
match /show (.+)/
|
21
|
+
match /staff (.+)/, method: :by_staff
|
22
|
+
|
23
|
+
def by_staff(m, user)
|
24
|
+
user = user.split(' ')
|
25
|
+
role = user.last.to_sym.downcase
|
26
|
+
if [ :translator, :editor, :checker, :timer, :typesetter, :encoder, :qchecker ].include? role
|
27
|
+
user.pop
|
28
|
+
options = { user: user.join(' '), role: role }
|
29
|
+
else
|
30
|
+
options = { user: user.join(' ') }
|
31
|
+
end
|
32
|
+
|
33
|
+
host = get_host 'pigro.txt'
|
34
|
+
shows = Assonnato::Show.new host
|
35
|
+
|
36
|
+
series = shows.all!(:ongoing, options) + shows.all!(:dropped, options) + shows.all!(:finished, options)
|
37
|
+
|
38
|
+
if series.empty?
|
39
|
+
if options.has_key? :role
|
40
|
+
m.reply "#{options[:user].colorize} hasn't worked to any series as #{options[:role].colorize}."
|
41
|
+
else
|
42
|
+
m.reply "#{options[:user].colorize} hasn't worked to any series."
|
43
|
+
end
|
44
|
+
return
|
45
|
+
end
|
46
|
+
|
47
|
+
m.reply ''.tap { |str|
|
48
|
+
if options.has_key? :role
|
49
|
+
str << "#{options[:user].colorize} has worked as #{options[:role].colorize} at "
|
50
|
+
else
|
51
|
+
str << "#{options[:user].colorize} has worked a at "
|
52
|
+
end
|
53
|
+
|
54
|
+
series.each { |s|
|
55
|
+
str << "#{s.name.colorize}, "
|
56
|
+
}
|
57
|
+
}[0..-3]
|
58
|
+
end
|
21
59
|
|
22
60
|
def execute(m, keyword)
|
23
61
|
s = keyword.split
|
@@ -1,4 +1,17 @@
|
|
1
|
-
|
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
|
+
|
2
15
|
class Descartes
|
3
16
|
class Seen
|
4
17
|
include Cinch::Plugin
|
data/lib/descartes/version.rb
CHANGED