]>
jfr.im git - erebus.git/blob - modules/stafflist.py
1 # Erebus IRC bot - Author: Erebus Team
3 # This file is released into the public domain; see http://unlicense.org/
7 'author': 'Erebus Team',
8 'license': 'public domain',
9 'compatible': [0], # compatible module API versions
10 'depends': [], # other modules required to work properly?
11 'softdeps': ['help'], # modules which are preferred but not required
16 lib
= modlib
.modlib(__name__
)
17 modstart
= lib
.modstart
21 @lib.hook(needchan
=False)
22 @lib.help(None, 'lists staff')
24 def stafflist(bot
, user
, chan
, realtarget
, *args
):
25 c
= lib
.parent
.query("SELECT auth, level FROM users WHERE level > %s", (lib
.parent
.cfg
.get('stafflist', 'minstafflevel', default
=lib
.KNOWN
)))
30 if user
.glevel
> lib
.KNOWN
:
31 response
= ["%s (%s)" % (i
['auth'], i
['level']) for i
in staffs
]
33 response
= [i
['auth'] for i
in staffs
]
34 user
.msg("Staff listing: %s" % (', '.join(response
)))