protonbot-chanop 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +37 -0
- data/Rakefile +2 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/protonbot/chanop.rb +5 -0
- data/lib/protonbot/chanop/commands.rb +261 -0
- data/lib/protonbot/chanop/plugin.rb +26 -0
- data/protonbot-chanop.gemspec +28 -0
- metadata +98 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 014c01c5e0781aaaa35db49b13eb769e19400304
|
4
|
+
data.tar.gz: fa182ad77653fc4b54b593c0b82c73a21d196e35
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 76f189a6b3a7ea930f2b7cbfda322c5193cbb17113fea0258de97402bb38281ad187af87927ce4beb80431e5271e9d5c4685daf9e4fbd9553ca00b00ab506403
|
7
|
+
data.tar.gz: bb41e57cec97fc2da31d432de3d0f0bfce82e08209f8e2b88d88744e9abf0a6d9378d3951f0a987616e6f50f4ac1d52f41948e573f3346687f8aae246bb0f3be
|
data/.gitignore
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at nickolay02@inbox.ru. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 Nickolay
|
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,37 @@
|
|
1
|
+
# Protonbot::Chanop
|
2
|
+
|
3
|
+
ChanOp plugin for ProtonBot.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your bot's Gemfile ad `plugin_loader`:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'protonbot-chanop'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Now you have installed this plugin.
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
Use `\list chanop` for more info.
|
22
|
+
|
23
|
+
## Development
|
24
|
+
|
25
|
+
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
26
|
+
|
27
|
+
To install this gem onto your local machine, run `bundler exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundler exec rake release \[origin\]`, 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).
|
28
|
+
|
29
|
+
## Contributing
|
30
|
+
|
31
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/handicraftsman/ProtonBot-Chanop. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
32
|
+
|
33
|
+
|
34
|
+
## License
|
35
|
+
|
36
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
37
|
+
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "protonbot/chanop"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
@@ -0,0 +1,261 @@
|
|
1
|
+
core.help_add('chanop', 'op', 'op [[chan] target]',
|
2
|
+
'Ops self/target on this/given channel')
|
3
|
+
cmd(cmd: 'op') do |dat|
|
4
|
+
case dat[:split].length
|
5
|
+
when 0
|
6
|
+
dat[:plug].op(dat[:target], dat[:nick])
|
7
|
+
when 1
|
8
|
+
dat[:plug].op(dat[:target], dat[:split][0])
|
9
|
+
when 2..512
|
10
|
+
dat[:plug].op(dat[:split][0], dat[:split][1])
|
11
|
+
end
|
12
|
+
end.perm!('op')
|
13
|
+
|
14
|
+
core.help_add('chanop', 'deop', 'deop [[chan] target]',
|
15
|
+
'Deops self/target on this/given channel')
|
16
|
+
cmd(cmd: 'deop') do |dat|
|
17
|
+
case dat[:split].length
|
18
|
+
when 0
|
19
|
+
dat[:plug].deop(dat[:target], dat[:nick])
|
20
|
+
when 1
|
21
|
+
dat[:plug].deop(dat[:target], dat[:split][0])
|
22
|
+
when 2..512
|
23
|
+
dat[:plug].deop(dat[:split][0], dat[:split][1])
|
24
|
+
end
|
25
|
+
end.perm!('op')
|
26
|
+
|
27
|
+
core.help_add('chanop', 'voice', 'voice [[chan] target]',
|
28
|
+
'Voices self/target on this/given channel')
|
29
|
+
cmd(cmd: 'voice') do |dat|
|
30
|
+
case dat[:split].length
|
31
|
+
when 0
|
32
|
+
dat[:plug].voice(dat[:target], dat[:nick])
|
33
|
+
when 1
|
34
|
+
dat[:plug].voice(dat[:target], dat[:split][0])
|
35
|
+
when 2..512
|
36
|
+
dat[:plug].voice(dat[:split][0], dat[:split][1])
|
37
|
+
end
|
38
|
+
end.perm!('voice')
|
39
|
+
|
40
|
+
core.help_add('chanop', 'devoice', 'devoice [[chan] target]',
|
41
|
+
'Devoices self/target on this/given channel')
|
42
|
+
cmd(cmd: 'devoice') do |dat|
|
43
|
+
case dat[:split].length
|
44
|
+
when 0
|
45
|
+
dat[:plug].devoice(dat[:target], dat[:nick])
|
46
|
+
when 1
|
47
|
+
dat[:plug].devoice(dat[:target], dat[:split][0])
|
48
|
+
when 2..512
|
49
|
+
dat[:plug].devoice(dat[:split][0], dat[:split][1])
|
50
|
+
end
|
51
|
+
end.perm!('voice')
|
52
|
+
|
53
|
+
core.help_add('chanop', 'quiet', 'quiet [chan] <target>',
|
54
|
+
'Quiets target on this/given channel')
|
55
|
+
cmd(cmd: 'quiet') do |dat|
|
56
|
+
case dat[:split].length
|
57
|
+
when 0
|
58
|
+
dat.nreply 'Not enough parameters!'
|
59
|
+
when 1
|
60
|
+
dat[:plug].quiet(dat[:target], '*!*@' + dat[:plug].gethost(dat[:split][0]))
|
61
|
+
when 2..512
|
62
|
+
dat[:plug].quiet(dat[:split][0], '*!*@' + dat[:plug].gethost(dat[:split][1]))
|
63
|
+
end
|
64
|
+
end.perm!('quiet')
|
65
|
+
|
66
|
+
core.help_add('chanop', 'unquiet', 'unquiet [chan] <target>',
|
67
|
+
'Unquiets target on this/given channel')
|
68
|
+
cmd(cmd: 'unquiet') do |dat|
|
69
|
+
case dat[:split].length
|
70
|
+
when 0
|
71
|
+
dat.nreply 'Not enough parameters!'
|
72
|
+
when 1
|
73
|
+
dat[:plug].unquiet(dat[:target], '*!*@' + dat[:plug].gethost(dat[:split][0]))
|
74
|
+
when 2..512
|
75
|
+
dat[:plug].unquiet(dat[:split][0], '*!*@' + dat[:plug].gethost(dat[:split][1]))
|
76
|
+
end
|
77
|
+
end.perm!('quiet')
|
78
|
+
|
79
|
+
core.help_add('chanop', 'ban', 'ban [chan] <target>',
|
80
|
+
'Bans target on this/given channel')
|
81
|
+
cmd(cmd: 'ban') do |dat|
|
82
|
+
case dat[:split].length
|
83
|
+
when 0
|
84
|
+
dat.nreply 'Not enough parameters!'
|
85
|
+
when 1
|
86
|
+
dat[:plug].ban(dat[:target], '*!*@' + dat[:plug].gethost(dat[:split][0]))
|
87
|
+
when 2..512
|
88
|
+
dat[:plug].ban(dat[:split][0], '*!*@' + dat[:plug].gethost(dat[:split][1]))
|
89
|
+
end
|
90
|
+
end.perm!('ban')
|
91
|
+
|
92
|
+
core.help_add('chanop', 'unban', 'unban [chan] <target>',
|
93
|
+
'Unbans target on this/given channel')
|
94
|
+
cmd(cmd: 'unban') do |dat|
|
95
|
+
case dat[:split].length
|
96
|
+
when 0
|
97
|
+
dat.nreply 'Not enough parameters!'
|
98
|
+
when 1
|
99
|
+
dat[:plug].unban(dat[:target], '*!*@' + dat[:plug].gethost(dat[:split][0]))
|
100
|
+
when 2..512
|
101
|
+
dat[:plug].unban(dat[:split][0], '*!*@' + dat[:plug].gethost(dat[:split][1]))
|
102
|
+
end
|
103
|
+
end.perm!('ban')
|
104
|
+
|
105
|
+
core.help_add('chanop', 'excempt', 'excempt [[chan] target]',
|
106
|
+
'Excempts self/target on this/given channel')
|
107
|
+
cmd(cmd: 'excempt') do |dat|
|
108
|
+
case dat[:split].length
|
109
|
+
when 0
|
110
|
+
dat[:plug].excempt(dat[:target], '*!*@' + dat[:plug].gethost(dat[:nick]))
|
111
|
+
when 1
|
112
|
+
dat[:plug].excempt(dat[:target], '*!*@' + dat[:plug].gethost(dat[:split][0]))
|
113
|
+
when 2..512
|
114
|
+
dat[:plug].excempt(dat[:split][0], '*!*@' + dat[:plug].gethost(dat[:split][1]))
|
115
|
+
end
|
116
|
+
end.perm!('excempt')
|
117
|
+
|
118
|
+
core.help_add('chanop', 'excempt', 'excempt [[chan] target]',
|
119
|
+
'Unexcempts self/target on this/given channel')
|
120
|
+
cmd(cmd: 'unexcempt') do |dat|
|
121
|
+
case dat[:split].length
|
122
|
+
when 0
|
123
|
+
dat[:plug].unexcempt(dat[:target], '*!*@' + dat[:plug].gethost(dat[:nick]))
|
124
|
+
when 1
|
125
|
+
dat[:plug].unexcempt(dat[:target], '*!*@' + dat[:plug].gethost(dat[:split][0]))
|
126
|
+
when 2..512
|
127
|
+
dat[:plug].unexcempt(dat[:split][0], '*!*@' + dat[:plug].gethost(dat[:split][1]))
|
128
|
+
end
|
129
|
+
end.perm!('excempt')
|
130
|
+
|
131
|
+
core.help_add('chanop', 'kick', 'kick [chan] <target>',
|
132
|
+
'Kicks target from this/given channel')
|
133
|
+
cmd(cmd: 'kick') do |dat|
|
134
|
+
case dat[:split].length
|
135
|
+
when 0
|
136
|
+
dat.nreply 'Not enough parameters!'
|
137
|
+
when 1
|
138
|
+
dat[:plug].kick(dat[:target], dat[:split][0])
|
139
|
+
when 2..512
|
140
|
+
dat[:plug].kick(dat[:split][0], dat[:split][1], dat[:split][2..dat[:split].length-1].join(' '))
|
141
|
+
end
|
142
|
+
end.perm!('kick')
|
143
|
+
|
144
|
+
cmd(cmd: 'remove') do |dat|
|
145
|
+
case dat[:split].length
|
146
|
+
when 0
|
147
|
+
dat.nreply 'Not enough parameters!'
|
148
|
+
when 1
|
149
|
+
dat[:plug].remove(dat[:target], dat[:split][0])
|
150
|
+
when 2..512
|
151
|
+
dat[:plug].remove(dat[:split][0], dat[:split][1], dat[:split][2..dat[:split].length-1].join(' '))
|
152
|
+
end
|
153
|
+
end.perm!('remove')
|
154
|
+
|
155
|
+
core.help_add('chanop', 'kban', 'kban [chan] <target>',
|
156
|
+
'Kickbans target from this/given channel')
|
157
|
+
cmd(cmd: 'kban') do |dat|
|
158
|
+
case dat[:split].length
|
159
|
+
when 0
|
160
|
+
dat.nreply 'Not enough parameters!'
|
161
|
+
when 1
|
162
|
+
dat[:plug].ban(dat[:target], '*!*@' + dat[:plug].gethost(dat[:split][0]))
|
163
|
+
dat[:plug].kick(dat[:target], dat[:split][0])
|
164
|
+
when 2..512
|
165
|
+
dat[:plug].ban(dat[:target], '*!*@' + dat[:plug].gethost(dat[:split][1]))
|
166
|
+
dat[:plug].kick(dat[:split][0], dat[:split][1], dat[:split][2..dat[:split].length-1].join(' '))
|
167
|
+
end
|
168
|
+
end.perm!('kickban')
|
169
|
+
|
170
|
+
core.help_add('chanop', 'arjk', 'arjk [chan] <target>',
|
171
|
+
'Anti-Rejoin-Kicks target from this/given channel')
|
172
|
+
cmd(cmd: 'arjk') do |dat|
|
173
|
+
case dat[:split].length
|
174
|
+
when 0
|
175
|
+
dat.nreply 'Not enough parameters!'
|
176
|
+
when 1
|
177
|
+
dat[:plug].ban(dat[:target], '*!*@' + dat[:plug].gethost(dat[:split][0]))
|
178
|
+
dat[:plug].kick(dat[:target], dat[:split][0])
|
179
|
+
sleep(5)
|
180
|
+
dat[:plug].unban(dat[:target], '*!*@' + dat[:plug].gethost(dat[:split][0]))
|
181
|
+
when 2..512
|
182
|
+
dat[:plug].ban(dat[:target], '*!*@' + dat[:plug].gethost(dat[:split][1]))
|
183
|
+
dat[:plug].kick(dat[:split][0], dat[:split][1], dat[:split][2..dat[:split].length-1].join(' '))
|
184
|
+
sleep(5)
|
185
|
+
dat[:plug].unban(dat[:target], '*!*@' + dat[:plug].gethost(dat[:split][1]))
|
186
|
+
end
|
187
|
+
end.perm!('arjk')
|
188
|
+
|
189
|
+
core.help_add('chanop', 'arjr', 'arjr [chan] <target>',
|
190
|
+
'Anti-Rejoin-Removes target from this/given channel')
|
191
|
+
cmd(cmd: 'arjr') do |dat|
|
192
|
+
case dat[:split].length
|
193
|
+
when 0
|
194
|
+
dat.nreply 'Not enough parameters!'
|
195
|
+
when 1
|
196
|
+
dat[:plug].ban(dat[:target], '*!*@' + dat[:plug].gethost(dat[:split][0]))
|
197
|
+
dat[:plug].remove(dat[:target], dat[:split][0])
|
198
|
+
sleep(5)
|
199
|
+
dat[:plug].unban(dat[:target], '*!*@' + dat[:plug].gethost(dat[:split][0]))
|
200
|
+
when 2..512
|
201
|
+
dat[:plug].ban(dat[:target], '*!*@' + dat[:plug].gethost(dat[:split][1]))
|
202
|
+
dat[:plug].remove(dat[:split][0], dat[:split][1], dat[:split][2..dat[:split].length-1].join(' '))
|
203
|
+
sleep(5)
|
204
|
+
dat[:plug].unban(dat[:target], '*!*@' + dat[:plug].gethost(dat[:split][1]))
|
205
|
+
end
|
206
|
+
end.perm!('arjr')
|
207
|
+
|
208
|
+
core.help_add('chanop', 'umode', 'umode [chan] <user> <mode>',
|
209
|
+
'Sets given mode on given user at this/given channel')
|
210
|
+
cmd(cmd: 'umode') do |dat|
|
211
|
+
case dat[:split].length
|
212
|
+
when 0..1
|
213
|
+
dat.nreply 'Not enough parameters!'
|
214
|
+
when 2
|
215
|
+
unless /[+-]/ =~ dat[:split][1][0]
|
216
|
+
dat.nreply 'Wrong mode!'
|
217
|
+
break
|
218
|
+
end
|
219
|
+
dat[:plug].usermode(dat[:target], dat[:split][0], dat[:split][1])
|
220
|
+
when 3..512
|
221
|
+
unless /[+-]/ =~ dat[:split][2][0]
|
222
|
+
dat.nreply 'Wrong mode!'
|
223
|
+
break
|
224
|
+
end
|
225
|
+
dat[:plug].usermode(dat[:split][0], dat[:split][1], dat[:split][2])
|
226
|
+
end
|
227
|
+
end.perm!('umode')
|
228
|
+
|
229
|
+
core.help_add('chanop', 'umode', 'umode [chan] <mode>',
|
230
|
+
'Sets given mode on this/given channel')
|
231
|
+
cmd(cmd: 'cmode') do |dat|
|
232
|
+
case dat[:split].length
|
233
|
+
when 0
|
234
|
+
dat.nreply 'Not enough parameters!'
|
235
|
+
when 1
|
236
|
+
if /[+-]/ =~ dat[:split][0][0]
|
237
|
+
dat[:plug].chanmode(dat[:target], dat[:split][0])
|
238
|
+
else
|
239
|
+
dat.nreply 'Wrong mode!'
|
240
|
+
end
|
241
|
+
when 2..512
|
242
|
+
if /[+-]/ =~ dat[:split][1][0]
|
243
|
+
dat[:plug].chanmode(dat[:split][0], dat[:split][1])
|
244
|
+
else
|
245
|
+
dat.nreply 'Wrong mode!'
|
246
|
+
end
|
247
|
+
end
|
248
|
+
end.perm!('cmode')
|
249
|
+
|
250
|
+
core.help_add('chanop', 'invite', 'invite [chan] <user>',
|
251
|
+
'Invites given user to this/given channel')
|
252
|
+
cmd(cmd: 'invite') do |dat|
|
253
|
+
case dat[:split].length
|
254
|
+
when 0
|
255
|
+
dat.nreply 'Not enough parameters!'
|
256
|
+
when 1
|
257
|
+
dat[:plug].invite(dat[:target], dat[:split][0])
|
258
|
+
when 2..512
|
259
|
+
dat[:plug].invite(dat[:split][0], dat[:split][1])
|
260
|
+
end
|
261
|
+
end.perm!('invite')
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'protonbot/chanop'
|
2
|
+
|
3
|
+
ProtonBot::Plugin.new do
|
4
|
+
@name = 'Chanop'
|
5
|
+
@version = ProtonBot::Chanop::VERSION
|
6
|
+
@description = 'Chanop plugin for ProtonBot'
|
7
|
+
|
8
|
+
core.permhash['admin'] << 'chanop'
|
9
|
+
core.permhash['chanop'] = %w(
|
10
|
+
kickban
|
11
|
+
kick
|
12
|
+
remove
|
13
|
+
ban
|
14
|
+
arjk
|
15
|
+
arjr
|
16
|
+
excempt
|
17
|
+
quiet
|
18
|
+
umode
|
19
|
+
cmode
|
20
|
+
op
|
21
|
+
voice
|
22
|
+
invite
|
23
|
+
)
|
24
|
+
|
25
|
+
run 'commands'
|
26
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'protonbot/chanop'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'protonbot-chanop'
|
8
|
+
spec.version = ProtonBot::Chanop::VERSION
|
9
|
+
spec.authors = ['Nickolay Ilyushin']
|
10
|
+
spec.email = ['nickolay02@inbox.ru']
|
11
|
+
|
12
|
+
spec.summary = 'Chanop plugin for protonbot'
|
13
|
+
spec.description = 'Chanop plugin for protonbot'
|
14
|
+
spec.homepage = 'https://github.com/handicraftsman/protonbot-chanop'
|
15
|
+
spec.license = 'MIT'
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
18
|
+
f.match(%r{^(test|spec|features)/})
|
19
|
+
end
|
20
|
+
spec.bindir = 'exe'
|
21
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
|
+
spec.require_paths = ['lib']
|
23
|
+
|
24
|
+
spec.add_development_dependency 'bundler', '~> 1.13'
|
25
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
26
|
+
|
27
|
+
spec.add_runtime_dependency 'protonbot', '~> 0.1.0'
|
28
|
+
end
|
metadata
ADDED
@@ -0,0 +1,98 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: protonbot-chanop
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Nickolay Ilyushin
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-03-29 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.13'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.13'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: protonbot
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.1.0
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.1.0
|
55
|
+
description: Chanop plugin for protonbot
|
56
|
+
email:
|
57
|
+
- nickolay02@inbox.ru
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- ".gitignore"
|
63
|
+
- CODE_OF_CONDUCT.md
|
64
|
+
- Gemfile
|
65
|
+
- LICENSE.txt
|
66
|
+
- README.md
|
67
|
+
- Rakefile
|
68
|
+
- bin/console
|
69
|
+
- bin/setup
|
70
|
+
- lib/protonbot/chanop.rb
|
71
|
+
- lib/protonbot/chanop/commands.rb
|
72
|
+
- lib/protonbot/chanop/plugin.rb
|
73
|
+
- protonbot-chanop.gemspec
|
74
|
+
homepage: https://github.com/handicraftsman/protonbot-chanop
|
75
|
+
licenses:
|
76
|
+
- MIT
|
77
|
+
metadata: {}
|
78
|
+
post_install_message:
|
79
|
+
rdoc_options: []
|
80
|
+
require_paths:
|
81
|
+
- lib
|
82
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
83
|
+
requirements:
|
84
|
+
- - ">="
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: '0'
|
87
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - ">="
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '0'
|
92
|
+
requirements: []
|
93
|
+
rubyforge_project:
|
94
|
+
rubygems_version: 2.6.8
|
95
|
+
signing_key:
|
96
|
+
specification_version: 4
|
97
|
+
summary: Chanop plugin for protonbot
|
98
|
+
test_files: []
|