# Erebus IRC bot - Author: Erebus Team
+# vim: fileencoding=utf-8
+# Commands to message various destinations
# This file is released into the public domain; see http://unlicense.org/
# module info
modinfo = {
'author': 'Erebus Team',
'license': 'public domain',
- 'compatible': [2],
+ 'compatible': [0],
'depends': [],
'softdeps': ['help'],
}
# module code
import time
-@lib.hook(clevel=lib.OP)
+@lib.hook(('say','cmsg'), clevel=lib.OP)
@lib.help('<message>', 'sends message to channel')
@lib.argsGE(1)
-def cmsg(bot, user, chan, realtarget, *args):
+def say(bot, user, chan, realtarget, *args):
chan.msg(' '.join(args))
target = None
if args[0].startswith("#"):
target = bot.parent.channel(args[0])
- if target is not None:
sendbot = target.bot
else:
target = args[0]
@lib.argsEQ(1)
def moo(bot, user, chan, realtarget, *args):
lines= [' .= , =.', " _ _ /'/ )\\,/,/(_ \\ \\", ' `//-.| ( ,\\\\)\\//\\)\\/_ ) |', " //___\\ `\\\\\\/\\\\/\\/\\\\///' /", ',-"~`-._ `"--\'_ `"""` _ \\`\'"~-,_', '\\ `-. \'_`. .\'_` \\ ,-"~`/', " `.__.-'`/ (-\\ /-) |-.__,'", ' || | \\O) /^\\ (O/ |', ' `\\\\ | / `\\ /', ' \\\\ \\ / `\\ /', " `\\\\ `-. /' .---.--.\\", " `\\\\/`~(, '() ('", ' /(O) \\\\ _,.-.,_)', " // \\\\ `\\'` /", ' / | || `""""~"`', " /' |__||", ' `o']
+ bots = list(bot.parent.bots.values())
for i in range(len(lines)):
- sender = bot.parent.bots.values()[i%len(bot.parent.bots.values())]
+ sender = bots[i%len(bots)]
mylen = len(sender.nick)
padding = 15-mylen
sender.fastmsg(args[0], " "*padding + lines[i])
- time.sleep(0.1)