kag-gather 1.5.2 → 1.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/kag/bot/plugin.rb +32 -0
- data/lib/kag/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OWM5YzRkYmEwMTIzYzAwYmQwZWRjNDgxNmI4NmJlYzUyZWFmZWIyMw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NjRhYTkwMmNhNDM1MWRlZGY3ZjZkNmUxYmNhZWJlZDM3NjhhNmI0Yw==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZGZiMzQ5MDUwZTgzYzEyOTkzNTg0MTg3ODdhY2NjNmRmYmYzYzJhZDhlZDcy
|
10
|
+
MGZmMTVhYjcxNTdkNmMxOGViZmE4ZjM0OGI0MzY3YmViOWVkNWNkNzFmMTYz
|
11
|
+
ODZhOTliMjYzNTVmNDRjOWNjN2FlZWZjNWEyZjQwMDQwMGI2ZGE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MDFiOWZmMzgzYWI5MGVmYzMzYzY1M2UyOTA5ZWNlNTVhMDEwOTZiYTdmNDQy
|
14
|
+
OTQxOWQ1NjhiOWRiNDQxOTMzM2E2ZjExMDRjMDU3MjRkMjU3ZTYyNzc4OWZi
|
15
|
+
YjJjODZhYTMxNzQyM2VkOTVhMjVlNGI4NWNhMzM5ZDU1OTQxNDY=
|
data/lib/kag/bot/plugin.rb
CHANGED
@@ -9,6 +9,11 @@ module KAG
|
|
9
9
|
include Cinch::Commands
|
10
10
|
include KAG::Common
|
11
11
|
|
12
|
+
listen_to :connect, :method => :on_connect
|
13
|
+
def on_connect(m)
|
14
|
+
m.bot.set_mode("x")
|
15
|
+
end
|
16
|
+
|
12
17
|
command :quit,{},
|
13
18
|
summary: "Quit the bot",
|
14
19
|
admin: true
|
@@ -65,6 +70,33 @@ module KAG
|
|
65
70
|
m.reply "KAG Gather - version "+KAG::VERSION.to_s+" by splittingred - https://github.com/splittingred/kag-gather"
|
66
71
|
end
|
67
72
|
end
|
73
|
+
|
74
|
+
command :bot_mode,{mode: :string},
|
75
|
+
summary:"Set a mode on the bot",
|
76
|
+
admin:true
|
77
|
+
def bot_mode(m,mode)
|
78
|
+
if is_admin(m.user)
|
79
|
+
m.bot.set_mode(mode.to_s)
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
command :bot_join,{channel: :string,password: :string},
|
84
|
+
summary:"Tell the bot to join a channel",
|
85
|
+
admin:true
|
86
|
+
def bot_join(m,channel,password = nil)
|
87
|
+
if is_admin(m.user)
|
88
|
+
m.bot.join(channel,password)
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
command :bot_part,{channel: :string,reason: :string},
|
93
|
+
summary:"Tell the bot to part a channel",
|
94
|
+
admin:true
|
95
|
+
def bot_part(m,channel,reason = nil)
|
96
|
+
if is_admin(m.user)
|
97
|
+
m.bot.part(channel,reason)
|
98
|
+
end
|
99
|
+
end
|
68
100
|
end
|
69
101
|
end
|
70
102
|
end
|
data/lib/kag/version.rb
CHANGED