]> jfr.im git - erebus.git/blob - modules/test_flags.py
add flags parsing to modlib
[erebus.git] / modules / test_flags.py
1 # Erebus IRC bot - Author: Erebus Team
2 # vim: fileencoding=utf-8
3 # Various highly recommended "control" commands.
4 # This file is released into the public domain; see http://unlicense.org/
5
6 # module info
7 modinfo = {
8 'author': 'Erebus Team',
9 'license': 'public domain',
10 'compatible': [0],
11 'depends': [],
12 'softdeps': ['help'],
13 }
14
15 # preamble
16 import modlib
17 lib = modlib.modlib(__name__)
18 modstart = lib.modstart
19 modstop = lib.modstop
20
21 # module code
22 import sys, os
23 import ctlmod
24 from collections import deque
25
26
27 @lib.hook(needchan=False)
28 @lib.flags('foo','bar','baz','barz')
29 @lib.argsGE(1)
30 def flags(bot, user, chan, realtarget, flags, *args):
31 return repr((flags, args))