diff options
author | Tom Gilbert <tom@linuxbrit.co.uk> | 2004-10-09 01:51:05 +0000 |
---|---|---|
committer | Tom Gilbert <tom@linuxbrit.co.uk> | 2004-10-09 01:51:05 +0000 |
commit | 0f3e302547363ea237454dda891ddb5de1be4476 (patch) | |
tree | ec45be24a669ee28b5e2da4ff65e39265a418e0b /contrib/plugins/figlet.rb |
initial import of rbot
Diffstat (limited to 'contrib/plugins/figlet.rb')
-rw-r--r-- | contrib/plugins/figlet.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/contrib/plugins/figlet.rb b/contrib/plugins/figlet.rb new file mode 100644 index 00000000..ce17fe71 --- /dev/null +++ b/contrib/plugins/figlet.rb @@ -0,0 +1,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") |