blob: ce17fe716cf4bdce9a0f7a6338567ea15daf4b94 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
class FigletPlugin < Plugin
def help(plugin, topic="")
"figlet [<message>] => print using figlet"
end
def privmsg(m)
case m.params
when nil
m.reply "incorrect usage: " + help(m.plugin)
return
when (/^-/)
m.reply "incorrect usage: " + help(m.plugin)
return
else
m.reply Utils.safe_exec("/usr/bin/figlet", "-k", "-f", "mini", m.params)
return
end
end
end
plugin = FigletPlugin.new
plugin.register("figlet")
|