55from cloudbot .util import formatting
66
77
8- @asyncio .coroutine
98@hook .command ("groups" , "listgroups" , "permgroups" , permissions = ["permissions_users" ], autohelp = False )
9+ @asyncio .coroutine
1010def get_permission_groups (conn ):
1111 """- lists all valid groups
1212 :type conn: cloudbot.client.Client
1313 """
1414 return "Valid groups: {}" .format (conn .permissions .get_groups ())
1515
1616
17- @asyncio .coroutine
1817@hook .command ("gperms" , permissions = ["permissions_users" ])
18+ @asyncio .coroutine
1919def get_group_permissions (text , conn , notice ):
2020 """<group> - lists permissions given to <group>
2121 :type text: str
@@ -33,8 +33,8 @@ def get_group_permissions(text, conn, notice):
3333 notice ("Unknown group '{}'" .format (group ))
3434
3535
36- @asyncio .coroutine
3736@hook .command ("gusers" , permissions = ["permissions_users" ])
37+ @asyncio .coroutine
3838def get_group_users (text , conn , notice ):
3939 """<group> - lists users in <group>
4040 :type text: str
@@ -52,8 +52,8 @@ def get_group_users(text, conn, notice):
5252 notice ("Unknown group '{}'" .format (group ))
5353
5454
55- @asyncio .coroutine
5655@hook .command ("uperms" , autohelp = False )
56+ @asyncio .coroutine
5757def get_user_permissions (text , conn , mask , has_permission , notice ):
5858 """[user] - lists all permissions given to [user], or the caller if no user is specified
5959 :type text: str
@@ -77,8 +77,8 @@ def get_user_permissions(text, conn, mask, has_permission, notice):
7777 return "User {} has no elevated permissions" .format (user )
7878
7979
80- @asyncio .coroutine
8180@hook .command ("ugroups" , autohelp = False )
81+ @asyncio .coroutine
8282def get_user_groups (text , conn , mask , has_permission , notice ):
8383 """[user] - lists all permissions given to [user], or the caller if no user is specified
8484 :type text: str
@@ -102,8 +102,8 @@ def get_user_groups(text, conn, mask, has_permission, notice):
102102 return "User {} is in no permission groups" .format (user )
103103
104104
105- @asyncio .coroutine
106105@hook .command ("deluser" , permissions = ["permissions_users" ])
106+ @asyncio .coroutine
107107def remove_permission_user (text , nick , bot , conn , notice , reply , admin_log ):
108108 """<user> [group] - removes <user> from [group], or from all groups if no group is specified
109109 :type text: str
@@ -164,8 +164,8 @@ def remove_permission_user(text, nick, bot, conn, notice, reply, admin_log):
164164 permission_manager .reload ()
165165
166166
167- @asyncio .coroutine
168167@hook .command ("adduser" , permissions = ["permissions_users" ])
168+ @asyncio .coroutine
169169def add_permissions_user (text , nick , conn , bot , notice , reply , admin_log ):
170170 """<user> <group> - adds <user> to <group>
171171 :type text: str
@@ -208,8 +208,8 @@ def add_permissions_user(text, nick, conn, bot, notice, reply, admin_log):
208208 permission_manager .reload ()
209209
210210
211- @asyncio .coroutine
212211@hook .command ("stopthebot" , permissions = ["botcontrol" ])
212+ @asyncio .coroutine
213213def stop (text , bot ):
214214 """[reason] - stops me with [reason] as its quit message.
215215 :type text: str
@@ -221,8 +221,8 @@ def stop(text, bot):
221221 yield from bot .stop ()
222222
223223
224- @asyncio .coroutine
225224@hook .command (permissions = ["botcontrol" ])
225+ @asyncio .coroutine
226226def restart (text , bot ):
227227 """[reason] - restarts me with [reason] as its quit message.
228228 :type text: str
@@ -234,8 +234,8 @@ def restart(text, bot):
234234 yield from bot .restart ()
235235
236236
237- @asyncio .coroutine
238237@hook .command (permissions = ["botcontrol" , "snoonetstaff" ])
238+ @asyncio .coroutine
239239def join (text , conn , nick , notice , admin_log ):
240240 """<channel> - joins <channel>
241241 :type text: str
@@ -249,8 +249,8 @@ def join(text, conn, nick, notice, admin_log):
249249 conn .join (target )
250250
251251
252- @asyncio .coroutine
253252@hook .command (permissions = ["botcontrol" , "snoonetstaff" ], autohelp = False )
253+ @asyncio .coroutine
254254def part (text , conn , nick , chan , notice , admin_log ):
255255 """[#channel] - parts [#channel], or the caller's channel if no channel is specified
256256 :type text: str
@@ -269,8 +269,8 @@ def part(text, conn, nick, chan, notice, admin_log):
269269 conn .part (target )
270270
271271
272- @asyncio .coroutine
273272@hook .command (autohelp = False , permissions = ["botcontrol" ])
273+ @asyncio .coroutine
274274def cycle (text , conn , chan , notice ):
275275 """[#channel] - cycles [#channel], or the caller's channel if no channel is specified
276276 :type text: str
@@ -289,8 +289,8 @@ def cycle(text, conn, chan, notice):
289289 conn .join (target )
290290
291291
292- @asyncio .coroutine
293292@hook .command (permissions = ["botcontrol" ])
293+ @asyncio .coroutine
294294def nick (text , conn , notice , is_nick_valid ):
295295 """<nick> - changes my nickname to <nick>
296296 :type text: str
@@ -304,8 +304,8 @@ def nick(text, conn, notice, is_nick_valid):
304304 conn .set_nick (text )
305305
306306
307- @asyncio .coroutine
308307@hook .command (permissions = ["botcontrol" ])
308+ @asyncio .coroutine
309309def raw (text , conn , notice ):
310310 """<command> - sends <command> as a raw IRC command
311311 :type text: str
@@ -315,8 +315,8 @@ def raw(text, conn, notice):
315315 conn .send (text )
316316
317317
318- @asyncio .coroutine
319318@hook .command (permissions = ["botcontrol" , "snoonetstaff" ])
319+ @asyncio .coroutine
320320def say (text , conn , chan , nick , admin_log ):
321321 """[#channel] <message> - says <message> to [#channel], or to the caller's channel if no channel is specified
322322 :type text: str
@@ -335,8 +335,8 @@ def say(text, conn, chan, nick, admin_log):
335335 conn .message (channel , text )
336336
337337
338- @asyncio .coroutine
339338@hook .command ("message" , "sayto" , permissions = ["botcontrol" , "snoonetstaff" ])
339+ @asyncio .coroutine
340340def message (text , conn , nick , admin_log ):
341341 """<name> <message> - says <message> to <name>
342342 :type text: str
@@ -349,8 +349,8 @@ def message(text, conn, nick, admin_log):
349349 conn .message (channel , text )
350350
351351
352- @asyncio .coroutine
353352@hook .command ("me" , "act" , permissions = ["botcontrol" , "snoonetstaff" ])
353+ @asyncio .coroutine
354354def me (text , conn , chan , nick , admin_log ):
355355 """[#channel] <action> - acts out <action> in a [#channel], or in the current channel of none is specified
356356 :type text: str
@@ -369,8 +369,8 @@ def me(text, conn, chan, nick, admin_log):
369369 conn .ctcp (channel , "ACTION" , text )
370370
371371
372- @asyncio .coroutine
373372@hook .command (autohelp = False , permissions = ["botcontrol" ])
373+ @asyncio .coroutine
374374def listchans (conn , chan , message , notice ):
375375 """- Lists the current channels the bot is in"""
376376 chans = ', ' .join (sorted (conn .channels , key = lambda x : x .strip ('#' ).lower ()))
0 commit comments