kag-gather 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/config/config.sample.json +28 -0
- data/lib/gather.rb +3 -0
- data/lib/kag/bot.rb +2 -2
- data/lib/kag/gather.rb +17 -3
- data/lib/kag/server.rb +1 -1
- data/lib/kag/version.rb +1 -1
- metadata +53 -69
- /data/{README.md → readme.md} +0 -0
@@ -0,0 +1,28 @@
|
|
1
|
+
{
|
2
|
+
"server": "irc.quakenet.org"
|
3
|
+
,"channels": ["#kag.gather"]
|
4
|
+
,"nick": "KAGatherer"
|
5
|
+
,"realname": "KAG Gatherer"
|
6
|
+
,"ssl": false
|
7
|
+
|
8
|
+
,"owners": ["splittingred","tmewett","Kalikst","Downburst","SirSalami","Furai","Geti"]
|
9
|
+
,"match_size": 10
|
10
|
+
,"match_type": "CTF"
|
11
|
+
,"pick_classes": true
|
12
|
+
,"classes": ["Knight","Knight","Knight","Archer","Builder"]
|
13
|
+
,"debug": true
|
14
|
+
,"servers":{
|
15
|
+
"server1": {
|
16
|
+
"ip":"5.39.93.105"
|
17
|
+
,"port": "10001"
|
18
|
+
,"password": "1"
|
19
|
+
,"rcon_password": ""
|
20
|
+
}
|
21
|
+
,"server2":{
|
22
|
+
"ip":"5.39.93.105"
|
23
|
+
,"port": "20002"
|
24
|
+
,"password": "2"
|
25
|
+
,"rcon_password": ""
|
26
|
+
}
|
27
|
+
}
|
28
|
+
}
|
data/lib/gather.rb
ADDED
data/lib/kag/bot.rb
CHANGED
data/lib/kag/gather.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'cinch'
|
2
|
-
require
|
3
|
-
require
|
4
|
-
require
|
2
|
+
require 'kag/bot'
|
3
|
+
require 'kag/config'
|
4
|
+
require 'kag/server'
|
5
5
|
|
6
6
|
module KAG
|
7
7
|
class Gather
|
@@ -167,10 +167,17 @@ module KAG
|
|
167
167
|
|
168
168
|
send_channels_msg("MATCH: #{get_match_type_as_string} - #{team1.join(", ")} (Blue) vs #{team2.join(", ")} (Red)")
|
169
169
|
msg = "Join #{server[:key]} - #{server[:ip]}:#{server[:port]} password #{server[:password]} | Visit kag://#{server[:ip]}/#{server[:password]} | "
|
170
|
+
|
171
|
+
msg = msg + " Class: " if KAG::Config.instance[:pick_classes]
|
172
|
+
classes_t1 = get_team_classes(1)
|
173
|
+
classes_t2 = get_team_classes(2)
|
174
|
+
|
170
175
|
team1.each do |p|
|
176
|
+
msg = msg+classes_t1.shift if KAG::Config.instance[:pick_classes]
|
171
177
|
User(p).send(msg+" Blue Team #{team1.join(", ")}") unless p.include?("player")
|
172
178
|
end
|
173
179
|
team2.each do |p|
|
180
|
+
msg = msg+classes_t2.shift if KAG::Config.instance[:pick_classes]
|
174
181
|
User(p).send(msg+" Red Team #{team2.join(", ")}") unless p.include?("player")
|
175
182
|
end
|
176
183
|
|
@@ -246,5 +253,12 @@ module KAG
|
|
246
253
|
end
|
247
254
|
end
|
248
255
|
|
256
|
+
|
257
|
+
def get_team_classes(team)
|
258
|
+
classes = KAG::Config.instance[:classes]
|
259
|
+
classes.shuffle!
|
260
|
+
classes
|
261
|
+
end
|
262
|
+
|
249
263
|
end
|
250
264
|
end
|
data/lib/kag/server.rb
CHANGED
data/lib/kag/version.rb
CHANGED
metadata
CHANGED
@@ -1,144 +1,128 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kag-gather
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
4
|
+
version: 1.0.2
|
5
|
+
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Shaun McCormick
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-03-
|
12
|
+
date: 2013-03-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: cinch
|
16
|
-
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
17
18
|
requirements:
|
18
19
|
- - '='
|
19
20
|
- !ruby/object:Gem::Version
|
20
21
|
version: 2.0.4
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
21
25
|
none: false
|
22
|
-
requirement: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
27
|
- - '='
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: 2.0.4
|
27
|
-
none: false
|
28
|
-
prerelease: false
|
29
|
-
type: :runtime
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: json
|
32
|
-
version_requirements: !ruby/object:Gem::Requirement
|
33
|
-
requirements:
|
34
|
-
- - '='
|
35
|
-
- !ruby/object:Gem::Version
|
36
|
-
version: 1.7.6
|
37
|
-
none: false
|
38
32
|
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
39
34
|
requirements:
|
40
|
-
- - '
|
35
|
+
- - ! '>='
|
41
36
|
- !ruby/object:Gem::Version
|
42
|
-
version:
|
43
|
-
none: false
|
44
|
-
prerelease: false
|
37
|
+
version: '0'
|
45
38
|
type: :runtime
|
46
|
-
|
47
|
-
name: symboltable
|
39
|
+
prerelease: false
|
48
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
49
42
|
requirements:
|
50
|
-
- - '
|
43
|
+
- - ! '>='
|
51
44
|
- !ruby/object:Gem::Version
|
52
|
-
version:
|
53
|
-
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: symboltable
|
54
48
|
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
55
50
|
requirements:
|
56
51
|
- - '='
|
57
52
|
- !ruby/object:Gem::Version
|
58
53
|
version: 1.0.2
|
59
|
-
none: false
|
60
|
-
prerelease: false
|
61
54
|
type: :runtime
|
62
|
-
|
63
|
-
name: jruby-openssl
|
55
|
+
prerelease: false
|
64
56
|
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ! '>='
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
57
|
none: false
|
70
|
-
requirement: !ruby/object:Gem::Requirement
|
71
58
|
requirements:
|
72
|
-
- -
|
59
|
+
- - '='
|
73
60
|
- !ruby/object:Gem::Version
|
74
|
-
version:
|
75
|
-
none: false
|
76
|
-
prerelease: false
|
77
|
-
type: :runtime
|
61
|
+
version: 1.0.2
|
78
62
|
- !ruby/object:Gem::Dependency
|
79
63
|
name: kagerator
|
80
|
-
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
81
66
|
requirements:
|
82
67
|
- - '='
|
83
68
|
- !ruby/object:Gem::Version
|
84
|
-
version: 1.0.
|
69
|
+
version: 1.0.3
|
70
|
+
type: :runtime
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
73
|
none: false
|
86
|
-
requirement: !ruby/object:Gem::Requirement
|
87
74
|
requirements:
|
88
75
|
- - '='
|
89
76
|
- !ruby/object:Gem::Version
|
90
|
-
version: 1.0.
|
91
|
-
none: false
|
92
|
-
prerelease: false
|
93
|
-
type: :runtime
|
77
|
+
version: 1.0.3
|
94
78
|
- !ruby/object:Gem::Dependency
|
95
79
|
name: rake
|
96
|
-
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
97
82
|
requirements:
|
98
83
|
- - ! '>='
|
99
84
|
- !ruby/object:Gem::Version
|
100
85
|
version: '0'
|
86
|
+
type: :development
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
101
89
|
none: false
|
102
|
-
requirement: !ruby/object:Gem::Requirement
|
103
90
|
requirements:
|
104
91
|
- - ! '>='
|
105
92
|
- !ruby/object:Gem::Version
|
106
93
|
version: '0'
|
107
|
-
none: false
|
108
|
-
prerelease: false
|
109
|
-
type: :development
|
110
94
|
- !ruby/object:Gem::Dependency
|
111
95
|
name: rspec
|
112
|
-
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
113
98
|
requirements:
|
114
99
|
- - ! '>='
|
115
100
|
- !ruby/object:Gem::Version
|
116
101
|
version: '0'
|
102
|
+
type: :development
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
117
105
|
none: false
|
118
|
-
requirement: !ruby/object:Gem::Requirement
|
119
106
|
requirements:
|
120
107
|
- - ! '>='
|
121
108
|
- !ruby/object:Gem::Version
|
122
109
|
version: '0'
|
123
|
-
none: false
|
124
|
-
prerelease: false
|
125
|
-
type: :development
|
126
110
|
- !ruby/object:Gem::Dependency
|
127
111
|
name: guard-rspec
|
128
|
-
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
129
114
|
requirements:
|
130
115
|
- - ! '>='
|
131
116
|
- !ruby/object:Gem::Version
|
132
117
|
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
133
121
|
none: false
|
134
|
-
requirement: !ruby/object:Gem::Requirement
|
135
122
|
requirements:
|
136
123
|
- - ! '>='
|
137
124
|
- !ruby/object:Gem::Version
|
138
125
|
version: '0'
|
139
|
-
none: false
|
140
|
-
prerelease: false
|
141
|
-
type: :development
|
142
126
|
description: ''
|
143
127
|
email:
|
144
128
|
- splittingred@gmail.com
|
@@ -146,37 +130,37 @@ executables: []
|
|
146
130
|
extensions: []
|
147
131
|
extra_rdoc_files: []
|
148
132
|
files:
|
149
|
-
-
|
133
|
+
- readme.md
|
134
|
+
- lib/gather.rb
|
150
135
|
- lib/kag/bot.rb
|
151
136
|
- lib/kag/config.rb
|
152
137
|
- lib/kag/gather.rb
|
153
138
|
- lib/kag/server.rb
|
154
139
|
- lib/kag/version.rb
|
140
|
+
- config/config.sample.json
|
155
141
|
homepage: https://github.com/splittingred/kag-gather
|
156
142
|
licenses:
|
157
143
|
- GPLv2
|
158
|
-
post_install_message:
|
144
|
+
post_install_message:
|
159
145
|
rdoc_options: []
|
160
146
|
require_paths:
|
161
147
|
- lib
|
162
148
|
required_ruby_version: !ruby/object:Gem::Requirement
|
149
|
+
none: false
|
163
150
|
requirements:
|
164
151
|
- - ! '>='
|
165
152
|
- !ruby/object:Gem::Version
|
166
153
|
version: 1.9.2
|
167
|
-
none: false
|
168
154
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
155
|
+
none: false
|
169
156
|
requirements:
|
170
157
|
- - ! '>='
|
171
158
|
- !ruby/object:Gem::Version
|
172
159
|
version: 1.3.6
|
173
|
-
none: false
|
174
160
|
requirements: []
|
175
|
-
rubyforge_project:
|
176
|
-
rubygems_version: 1.8.
|
177
|
-
signing_key:
|
161
|
+
rubyforge_project:
|
162
|
+
rubygems_version: 1.8.24
|
163
|
+
signing_key:
|
178
164
|
specification_version: 3
|
179
165
|
summary: KAG Gather IRC Bot
|
180
166
|
test_files: []
|
181
|
-
has_rdoc:
|
182
|
-
...
|
/data/{README.md → readme.md}
RENAMED
File without changes
|