]> jfr.im git - erebus.git/blame - modules/foo.py
Spotify module added
[erebus.git] / modules / foo.py
CommitLineData
db75daab
JR
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
28d7d32f
JR
5# module info
6modinfo = {
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
5c6c0839
JR
13# preamble
14import modlib
15lib = modlib.modlib(__name__)
16modstart = lib.modstart
d1ea05b0 17modstop = lib.modstop
5c6c0839 18
28d7d32f 19# module code
32cabc3d
JR
20import ctlmod
21
5c6c0839 22@lib.hook('test')
88957808 23def cmd_test(bot, user, chan, realtarget, *args):
5c6c0839 24 bot.msg(chan, "You said: !test %s" % (' '.join([str(arg) for arg in args])))