]> jfr.im git - z_archive/Ophion.git/blame - modules/autoload/chmsg.py
Initialize repo
[z_archive/Ophion.git] / modules / autoload / chmsg.py
CommitLineData
b069ba10
JR
1from classes import *
2from util import *
3
4name = 'channel messaging'
5def init(cache):
6 cache.currmod = __name__
7 cache.hookcmd('SAY', 3, say, 1, helpsay)
8 cache.hookcmd('ACT', 3, act, 1, helpact)
9def deinit(cache, reloading=False):
10 cache.currmod = __name__
11 cache.unhookcmd('SAY')
12 cache.unhookcmd('ACT')
13
14def say(nick, target, params, bot, cache):
15 bot.msg(target, params)
16
17def act(nick, target, params, bot, cache):
18 bot.msg(target, "\001ACTION %s\001" % (params))
19
20def helpsay(): return ['SAY <#channel> <line>', 'Does a /ME.']
21def helpact(): return ['ACT <#channel> <line>', 'Does a /ME <line>.']