zetabot 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +4 -0
  3. data/Gemfile +4 -0
  4. data/Gemfile.lock +281 -0
  5. data/LICENSE.txt +21 -0
  6. data/README.md +41 -0
  7. data/Rakefile +6 -0
  8. data/Zeta.gemspec +74 -0
  9. data/bin/console +14 -0
  10. data/bin/setup +13 -0
  11. data/bin/zeta +9 -0
  12. data/bin/zeta-setup +13 -0
  13. data/lib/Zeta.rb +13 -0
  14. data/lib/Zeta/access.rb +84 -0
  15. data/lib/Zeta/admin.rb +10 -0
  16. data/lib/Zeta/admin/autojoin.rb +25 -0
  17. data/lib/Zeta/admin/bot.rb +43 -0
  18. data/lib/Zeta/admin/channels.rb +36 -0
  19. data/lib/Zeta/admin/eval.rb +43 -0
  20. data/lib/Zeta/admin/fifo.rb +45 -0
  21. data/lib/Zeta/admin/ignore.rb +112 -0
  22. data/lib/Zeta/admin/oper.rb +50 -0
  23. data/lib/Zeta/admin/plugins.rb +109 -0
  24. data/lib/Zeta/admin/users.rb +5 -0
  25. data/lib/Zeta/blacklist.rb +25 -0
  26. data/lib/Zeta/cache.rb +0 -0
  27. data/lib/Zeta/cinch.rb +35 -0
  28. data/lib/Zeta/config.rb +42 -0
  29. data/lib/Zeta/gems.rb +0 -0
  30. data/lib/Zeta/locale.rb +4 -0
  31. data/lib/Zeta/log.rb +2 -0
  32. data/lib/Zeta/models.rb +5 -0
  33. data/lib/Zeta/models/channel.rb +3 -0
  34. data/lib/Zeta/models/plugin.rb +3 -0
  35. data/lib/Zeta/models/user.rb +3 -0
  36. data/lib/Zeta/plugins.rb +27 -0
  37. data/lib/Zeta/plugins/attack.rb +61 -0
  38. data/lib/Zeta/plugins/botinfo.rb +83 -0
  39. data/lib/Zeta/plugins/darkscience.rb +215 -0
  40. data/lib/Zeta/plugins/dbz.rb +31 -0
  41. data/lib/Zeta/plugins/dcc.rb +25 -0
  42. data/lib/Zeta/plugins/dnsbl.rb +36 -0
  43. data/lib/Zeta/plugins/echo.rb +15 -0
  44. data/lib/Zeta/plugins/eightball.rb +53 -0
  45. data/lib/Zeta/plugins/fml.rb +35 -0
  46. data/lib/Zeta/plugins/fnord.rb +329 -0
  47. data/lib/Zeta/plugins/gem.rb +0 -0
  48. data/lib/Zeta/plugins/gif.rb +73 -0
  49. data/lib/Zeta/plugins/help.rb +32 -0
  50. data/lib/Zeta/plugins/libsecure.rb +34 -0
  51. data/lib/Zeta/plugins/macros.rb +124 -0
  52. data/lib/Zeta/plugins/movie.rb +67 -0
  53. data/lib/Zeta/plugins/pdfinfo.rb +69 -0
  54. data/lib/Zeta/plugins/rainbow.rb +65 -0
  55. data/lib/Zeta/plugins/russian_roulette.rb +90 -0
  56. data/lib/Zeta/plugins/seen.rb +77 -0
  57. data/lib/Zeta/plugins/silly.rb +183 -0
  58. data/lib/Zeta/plugins/snooper.rb +146 -0
  59. data/lib/Zeta/plugins/urban.rb +60 -0
  60. data/lib/Zeta/plugins/weather.rb +203 -0
  61. data/lib/Zeta/plugins/whois.rb +25 -0
  62. data/lib/Zeta/plugins/wiki.rb +75 -0
  63. data/lib/Zeta/plugins/wolfram.rb +46 -0
  64. data/lib/Zeta/tasks/db.rb +0 -0
  65. data/lib/Zeta/version.rb +3 -0
  66. data/lib/generators/config/config.rb +0 -0
  67. data/lib/generators/plugin/new_plugin.rb +0 -0
  68. data/locale/en/8ball.yml +0 -0
  69. data/locale/en/attack.yml +148 -0
  70. data/locale/en/dbz.yml +10 -0
  71. data/locale/en/ircop.yml +5 -0
  72. data/locale/en/macros.yml +98 -0
  73. data/locale/en/meme.yml +27 -0
  74. metadata +636 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 5fa6cf6f609918141fc03f0c56af2d2fe65aad5d
4
+ data.tar.gz: 11603efca35caa92df0a07930f3aba58cff45888
5
+ SHA512:
6
+ metadata.gz: d0e37902cd438d733b943c3176145fc7bdb4a0d94c2593cf799417fc334d55386951a4f6bf8ddb7eca95f18023c4bbcdcd2d54653c262ba9bc598d514dcbab2b
7
+ data.tar.gz: 9176370d5d7bce858890b804eef2aec90551a9b016e42b5fe1c2a3de71cb94e2b84c9df178ef851f21b20cf081ab9c32e36818120b1b76f91b3d2a28c22b3a76
data/.gitignore ADDED
@@ -0,0 +1,4 @@
1
+ .idea
2
+ log/
3
+ .DS_Store
4
+ Zeta-*.gem
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in Zeta.gemspec
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,281 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ zeta (0.0.1)
5
+ actionview
6
+ chronic
7
+ chronic_duration
8
+ cinch
9
+ cinch-cooldown
10
+ cinch-quotes
11
+ cinch-toolbox
12
+ crack
13
+ daemons
14
+ destructor
15
+ discourse_api
16
+ dnsbl-client
17
+ dronebl.rb
18
+ faraday
19
+ geocoder
20
+ gist
21
+ github_api
22
+ haml
23
+ hashie
24
+ httparty
25
+ humanize-bytes
26
+ ipaddress
27
+ mechanize
28
+ mkfifo
29
+ nokogiri
30
+ pdf-reader
31
+ persist
32
+ recursive-open-struct
33
+ rest-client
34
+ tag_formatter
35
+ video_info
36
+ wolfram
37
+ wolfram-alpha
38
+
39
+ GEM
40
+ remote: https://rubygems.org/
41
+ specs:
42
+ Ascii85 (1.0.2)
43
+ actionview (4.2.5.1)
44
+ activesupport (= 4.2.5.1)
45
+ builder (~> 3.1)
46
+ erubis (~> 2.7.0)
47
+ rails-dom-testing (~> 1.0, >= 1.0.5)
48
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
49
+ activesupport (4.2.5.1)
50
+ i18n (~> 0.7)
51
+ json (~> 1.7, >= 1.7.7)
52
+ minitest (~> 5.1)
53
+ thread_safe (~> 0.3, >= 0.3.4)
54
+ tzinfo (~> 1.1)
55
+ addressable (2.4.0)
56
+ afm (0.2.2)
57
+ ansi (1.5.0)
58
+ ast (2.2.0)
59
+ binding.repl (3.0.0)
60
+ builder (3.2.2)
61
+ cd (1.0.1)
62
+ chronic (0.10.2)
63
+ chronic_duration (0.10.6)
64
+ numerizer (~> 0.1.1)
65
+ cinch (2.3.1)
66
+ cinch-cooldown (1.1.7)
67
+ cinch (~> 2)
68
+ time-lord (~> 1.0, >= 1.0.1)
69
+ cinch-quotes (0.0.4)
70
+ cinch (~> 2.0)
71
+ cinch-toolbox (1.1.6)
72
+ nokogiri (~> 1.6)
73
+ clipboard (1.0.6)
74
+ code (0.9.0)
75
+ coderay (~> 1.1)
76
+ method_source (~> 0.8, >= 0.8.2)
77
+ coderay (1.1.0)
78
+ crack (0.4.3)
79
+ safe_yaml (~> 1.0.0)
80
+ daemons (1.2.3)
81
+ debugging (1.1.0)
82
+ binding.repl (~> 3.0)
83
+ paint (>= 0.9, < 2.0)
84
+ descendants_tracker (0.0.4)
85
+ thread_safe (~> 0.3, >= 0.3.1)
86
+ destructor (0.1.0)
87
+ diff-lcs (1.2.5)
88
+ discourse_api (0.7.0)
89
+ faraday (~> 0.9.0)
90
+ faraday_middleware (~> 0.9)
91
+ rack (~> 1.5)
92
+ dnsbl-client (1.0.3)
93
+ domain_name (0.5.20160128)
94
+ unf (>= 0.0.5, < 1.0.0)
95
+ dronebl.rb (0.1.0.0)
96
+ httparty (~> 0.13)
97
+ nokogiri (~> 1.6)
98
+ erubis (2.7.0)
99
+ every_day_irb (2.0.0)
100
+ cd (~> 1.0)
101
+ fancy_irb (1.0.0)
102
+ paint (>= 0.9, < 2.0)
103
+ unicode-display_width (>= 0.2.0)
104
+ faraday (0.9.2)
105
+ multipart-post (>= 1.2, < 3)
106
+ faraday_middleware (0.10.0)
107
+ faraday (>= 0.7.4, < 0.10)
108
+ ffi (1.9.10)
109
+ geocoder (1.3.0)
110
+ gist (4.5.0)
111
+ github_api (0.13.1)
112
+ addressable (~> 2.4.0)
113
+ descendants_tracker (~> 0.0.4)
114
+ faraday (~> 0.8, < 0.10)
115
+ hashie (>= 3.4)
116
+ multi_json (>= 1.7.5, < 2.0)
117
+ oauth2
118
+ haml (4.0.7)
119
+ tilt
120
+ hashery (2.1.1)
121
+ hashie (3.4.3)
122
+ hirb (0.7.3)
123
+ htmlentities (4.3.4)
124
+ http-cookie (1.0.2)
125
+ domain_name (~> 0.5)
126
+ httparty (0.13.7)
127
+ json (~> 1.8)
128
+ multi_xml (>= 0.5.2)
129
+ humanize-bytes (2.2.0)
130
+ i18n (0.7.0)
131
+ instance (0.2.0)
132
+ interactive_editor (0.0.10)
133
+ spoon (>= 0.0.1)
134
+ ipaddress (0.8.2)
135
+ irbtools (2.0.1)
136
+ binding.repl (~> 3.0)
137
+ clipboard (~> 1.0, >= 1.0.6)
138
+ code (~> 0.9)
139
+ coderay (~> 1.1)
140
+ debugging (~> 1.1)
141
+ every_day_irb (~> 2.0)
142
+ fancy_irb (~> 1.0)
143
+ hirb (~> 0.7, >= 0.7.3)
144
+ instance (~> 0.2)
145
+ interactive_editor (~> 0.0, >= 0.0.10)
146
+ method_locator (~> 0.0, >= 0.0.4)
147
+ methodfinder (~> 2.0)
148
+ ori (~> 0.1.0)
149
+ os (~> 0.9)
150
+ paint (>= 0.9, < 2.0)
151
+ ruby_engine (~> 1.0)
152
+ ruby_info (~> 1.0)
153
+ ruby_version (~> 1.0)
154
+ wirb (~> 2.0)
155
+ iso8601 (0.9.0)
156
+ json (1.8.3)
157
+ jwt (1.5.1)
158
+ loofah (2.0.3)
159
+ nokogiri (>= 1.5.9)
160
+ mechanize (2.7.4)
161
+ domain_name (~> 0.5, >= 0.5.1)
162
+ http-cookie (~> 1.0)
163
+ mime-types (>= 1.17.2, < 3)
164
+ net-http-digest_auth (~> 1.1, >= 1.1.1)
165
+ net-http-persistent (~> 2.5, >= 2.5.2)
166
+ nokogiri (~> 1.6)
167
+ ntlm-http (~> 0.1, >= 0.1.1)
168
+ webrobots (>= 0.0.9, < 0.2)
169
+ method_locator (0.0.4)
170
+ method_source (0.8.2)
171
+ methodfinder (2.0.0)
172
+ mime-types (2.99)
173
+ mini_portile2 (2.0.0)
174
+ minitest (5.8.4)
175
+ mkfifo (0.1.1)
176
+ multi_json (1.11.2)
177
+ multi_xml (0.5.5)
178
+ multipart-post (2.0.0)
179
+ net-http-digest_auth (1.4)
180
+ net-http-persistent (2.9.4)
181
+ netrc (0.11.0)
182
+ nokogiri (1.6.7.2)
183
+ mini_portile2 (~> 2.0.0.rc2)
184
+ ntlm-http (0.1.1)
185
+ numerizer (0.1.1)
186
+ oauth2 (1.1.0)
187
+ faraday (>= 0.8, < 0.10)
188
+ jwt (~> 1.0, < 1.5.2)
189
+ multi_json (~> 1.3)
190
+ multi_xml (~> 0.5)
191
+ rack (>= 1.2, < 3)
192
+ oga (2.1)
193
+ ast
194
+ ruby-ll (~> 2.1)
195
+ open_uri_redirections (0.2.1)
196
+ ori (0.1.0)
197
+ os (0.9.6)
198
+ paint (1.0.1)
199
+ pdf-reader (1.3.3)
200
+ Ascii85 (~> 1.0.0)
201
+ afm (~> 0.2.0)
202
+ hashery (~> 2.0)
203
+ ruby-rc4
204
+ ttfunk
205
+ persist (1.0.0)
206
+ rack (1.6.4)
207
+ rails-deprecated_sanitizer (1.0.3)
208
+ activesupport (>= 4.2.0.alpha)
209
+ rails-dom-testing (1.0.7)
210
+ activesupport (>= 4.2.0.beta, < 5.0)
211
+ nokogiri (~> 1.6.0)
212
+ rails-deprecated_sanitizer (>= 1.0.1)
213
+ rails-html-sanitizer (1.0.3)
214
+ loofah (~> 2.0)
215
+ rake (10.4.2)
216
+ recursive-open-struct (1.0.1)
217
+ rest-client (1.8.0)
218
+ http-cookie (>= 1.0.2, < 2.0)
219
+ mime-types (>= 1.16, < 3.0)
220
+ netrc (~> 0.7)
221
+ rspec (3.4.0)
222
+ rspec-core (~> 3.4.0)
223
+ rspec-expectations (~> 3.4.0)
224
+ rspec-mocks (~> 3.4.0)
225
+ rspec-core (3.4.1)
226
+ rspec-support (~> 3.4.0)
227
+ rspec-expectations (3.4.0)
228
+ diff-lcs (>= 1.2.0, < 2.0)
229
+ rspec-support (~> 3.4.0)
230
+ rspec-mocks (3.4.0)
231
+ diff-lcs (>= 1.2.0, < 2.0)
232
+ rspec-support (~> 3.4.0)
233
+ rspec-support (3.4.1)
234
+ ruby-ll (2.1.2)
235
+ ansi
236
+ ast
237
+ ruby-rc4 (0.1.5)
238
+ ruby_engine (1.0.1)
239
+ ruby_info (1.0.1)
240
+ ruby_version (1.0.1)
241
+ safe_yaml (1.0.4)
242
+ spoon (0.0.4)
243
+ ffi
244
+ tag_formatter (0.0.3)
245
+ thread_safe (0.3.5)
246
+ tilt (2.0.2)
247
+ time-lord (1.0.1)
248
+ ttfunk (1.4.0)
249
+ tzinfo (1.2.2)
250
+ thread_safe (~> 0.1)
251
+ unf (0.1.4)
252
+ unf_ext
253
+ unf_ext (0.0.7.2)
254
+ unicode-display_width (0.3.1)
255
+ video_info (2.5.0)
256
+ addressable
257
+ htmlentities
258
+ iso8601
259
+ multi_json (~> 1.11)
260
+ oga
261
+ open_uri_redirections
262
+ webrobots (0.1.2)
263
+ wirb (2.0.0)
264
+ paint (>= 0.9, < 2.0)
265
+ wolfram (0.2.1)
266
+ nokogiri (>= 1.4.3)
267
+ wolfram-alpha (0.3.1)
268
+ nokogiri
269
+
270
+ PLATFORMS
271
+ ruby
272
+
273
+ DEPENDENCIES
274
+ bundler (~> 1.11)
275
+ irbtools
276
+ rake (~> 10.0)
277
+ rspec (~> 3.0)
278
+ zeta!
279
+
280
+ BUNDLED WITH
281
+ 1.11.2
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Liothen
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,41 @@
1
+ # Zeta
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/Zeta`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'Zeta'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install Zeta
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/Zeta.
36
+
37
+
38
+ ## License
39
+
40
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
41
+
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/Zeta.gemspec ADDED
@@ -0,0 +1,74 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'Zeta/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "zetabot"
8
+ spec.version = Zeta::VERSION
9
+ spec.authors = ["Liothen"]
10
+ spec.email = ["liothen@flagrun.net"]
11
+
12
+ spec.summary = %q{Zeta is a IRC bot written in ruby using the Cinch Framework}
13
+ # spec.description = %q{TODO: Write a longer description or delete this line.}
14
+ spec.homepage = "https://github.com/flagrun/Zeta"
15
+ spec.license = "MIT"
16
+
17
+ # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
18
+ # delete this section to allow pushing this gem to any host.
19
+ if spec.respond_to?(:metadata)
20
+ spec.metadata['allowed_push_host'] = "https://rubygems.org"
21
+ else
22
+ raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
23
+ end
24
+
25
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
26
+ spec.bindir = "exe"
27
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
+ spec.require_paths = ["lib"]
29
+
30
+ spec.add_development_dependency "bundler", "~> 1.11"
31
+ spec.add_development_dependency "rake", "~> 10.0"
32
+ spec.add_development_dependency "rspec", "~> 3.0"
33
+ spec.add_development_dependency "irbtools"
34
+
35
+ spec.add_dependency 'daemons'
36
+ spec.add_dependency 'destructor'
37
+
38
+ spec.add_dependency 'cinch'
39
+ spec.add_dependency 'cinch-cooldown'
40
+ spec.add_dependency 'cinch-toolbox'
41
+ spec.add_dependency 'cinch-quotes'
42
+
43
+ spec.add_dependency 'mkfifo'
44
+ spec.add_dependency 'nokogiri'
45
+ spec.add_dependency 'dronebl.rb'
46
+ spec.add_dependency 'dnsbl-client'
47
+
48
+ spec.add_dependency 'chronic'
49
+ spec.add_dependency 'chronic_duration'
50
+ spec.add_dependency 'tag_formatter'
51
+ spec.add_dependency 'geocoder'
52
+ spec.add_dependency 'httparty'
53
+ spec.add_dependency 'rest-client'
54
+ spec.add_dependency 'haml'
55
+ spec.add_dependency 'actionview'
56
+ spec.add_dependency 'persist'
57
+ spec.add_dependency 'mechanize'
58
+
59
+ spec.add_dependency 'recursive-open-struct'
60
+ spec.add_dependency 'hashie'
61
+ spec.add_dependency 'pdf-reader'
62
+ spec.add_dependency 'faraday'
63
+ spec.add_dependency 'humanize-bytes'
64
+ spec.add_dependency 'crack'
65
+ spec.add_dependency 'ipaddress'
66
+
67
+ # API
68
+ spec.add_dependency 'wolfram'
69
+ spec.add_dependency 'wolfram-alpha'
70
+ spec.add_dependency 'github_api'
71
+ spec.add_dependency 'gist'
72
+ spec.add_dependency 'discourse_api'
73
+ spec.add_dependency 'video_info'
74
+ end