]>
Commit | Line | Data |
---|---|---|
931c88a4 | 1 | # Erebus IRC bot - Author: John Runyon |
2 | # simple module example | |
3 | # This file is released into the public domain; see http://unlicense.org/ | |
4 | ||
e4255e70 | 5 | # module info |
6 | modinfo = { | |
7 | 'author': 'John Runyon (DimeCadmium)', | |
8 | 'license': 'public domain', | |
9 | 'compatible': [1], # compatible module API versions | |
10 | 'depends': [], # other modules required to work properly? | |
11 | } | |
12 | ||
6c70d82c | 13 | # preamble |
14 | import modlib | |
15 | lib = modlib.modlib(__name__) | |
16 | modstart = lib.modstart | |
db50981b | 17 | modstop = lib.modstop |
6c70d82c | 18 | |
e4255e70 | 19 | # module code |
d431e543 | 20 | import ctlmod |
21 | ||
6c70d82c | 22 | @lib.hook('test') |
e39991e5 | 23 | def cmd_test(bot, user, chan, realtarget, *args): |
6c70d82c | 24 | bot.msg(chan, "You said: !test %s" % (' '.join([str(arg) for arg in args]))) |