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