get_out 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -0
- data/Gemfile +4 -0
- data/README.md +4 -0
- data/Rakefile +1 -0
- data/bin/get_out +3 -0
- data/get_out.gemspec +22 -0
- data/lib/get_out.rb +29 -0
- data/lib/get_out/version.rb +3 -0
- metadata +65 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/bin/get_out
ADDED
data/get_out.gemspec
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "get_out/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "get_out"
|
7
|
+
s.version = GetOut::VERSION
|
8
|
+
s.authors = ["Josef Šimánek"]
|
9
|
+
s.email = ["retro@ballgag.cz"]
|
10
|
+
s.homepage = "https://github.com/simi/get_out"
|
11
|
+
s.summary = %q{Simple get_out IRC bot}
|
12
|
+
s.description = %q{GET OUT, NOW!}
|
13
|
+
|
14
|
+
s.files = `git ls-files`.split("\n")
|
15
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
16
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
17
|
+
s.require_paths = ["lib"]
|
18
|
+
|
19
|
+
# specify any dependencies here; for example:
|
20
|
+
# s.add_development_dependency "rspec"
|
21
|
+
s.add_runtime_dependency "cinch"
|
22
|
+
end
|
data/lib/get_out.rb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
require 'cinch'
|
3
|
+
|
4
|
+
module GetOut
|
5
|
+
def self.now!
|
6
|
+
|
7
|
+
# We are starting a new IRC bot.
|
8
|
+
bot = Cinch::Bot.new do
|
9
|
+
configure do |c|
|
10
|
+
# By default it will use irc.cservers.cz server
|
11
|
+
# with Buh nick and will join #cservers channel.
|
12
|
+
c.server = "irc.cservers.cz"
|
13
|
+
c.nick = "Buh"
|
14
|
+
c.channels = ["#cservers"]
|
15
|
+
end
|
16
|
+
|
17
|
+
# When some types exactly "Prosím ať NICK strašně vypadne"
|
18
|
+
# it will automaticaly respond into channel with message
|
19
|
+
# "NICK: Strašně, ale strašně, vypadni!"
|
20
|
+
# So that one lucky user will get notification.
|
21
|
+
on :message, /^Prosím, ať (.+?) strašně vypadne :\(/ do |m, who|
|
22
|
+
m.reply "#{who}: Strašně, ale strašně, vypadni!"
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
# Finally, we need to start this circus.
|
27
|
+
bot.start
|
28
|
+
end
|
29
|
+
end
|
metadata
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: get_out
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Josef Šimánek
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-01-16 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: cinch
|
16
|
+
requirement: &5755440 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *5755440
|
25
|
+
description: GET OUT, NOW!
|
26
|
+
email:
|
27
|
+
- retro@ballgag.cz
|
28
|
+
executables:
|
29
|
+
- get_out
|
30
|
+
extensions: []
|
31
|
+
extra_rdoc_files: []
|
32
|
+
files:
|
33
|
+
- .gitignore
|
34
|
+
- Gemfile
|
35
|
+
- README.md
|
36
|
+
- Rakefile
|
37
|
+
- bin/get_out
|
38
|
+
- get_out.gemspec
|
39
|
+
- lib/get_out.rb
|
40
|
+
- lib/get_out/version.rb
|
41
|
+
homepage: https://github.com/simi/get_out
|
42
|
+
licenses: []
|
43
|
+
post_install_message:
|
44
|
+
rdoc_options: []
|
45
|
+
require_paths:
|
46
|
+
- lib
|
47
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
48
|
+
none: false
|
49
|
+
requirements:
|
50
|
+
- - ! '>='
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '0'
|
53
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
54
|
+
none: false
|
55
|
+
requirements:
|
56
|
+
- - ! '>='
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
version: '0'
|
59
|
+
requirements: []
|
60
|
+
rubyforge_project:
|
61
|
+
rubygems_version: 1.8.15
|
62
|
+
signing_key:
|
63
|
+
specification_version: 3
|
64
|
+
summary: Simple get_out IRC bot
|
65
|
+
test_files: []
|