diff options
author | Tom Gilbert <tom@linuxbrit.co.uk> | 2006-01-20 09:29:28 +0000 |
---|---|---|
committer | Tom Gilbert <tom@linuxbrit.co.uk> | 2006-01-20 09:29:28 +0000 |
commit | e8cc263c8aff27f3fb2849655cabdda412e89170 (patch) | |
tree | b1754618eedad9ae816b705fa0319ff509c9b6f1 /data/rbot/plugins | |
parent | 829028c017c8733e35f68a9b1c6636f46955a93e (diff) |
another plugin from Chris
Diffstat (limited to 'data/rbot/plugins')
-rw-r--r-- | data/rbot/plugins/figlet.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/data/rbot/plugins/figlet.rb b/data/rbot/plugins/figlet.rb new file mode 100644 index 00000000..f82288eb --- /dev/null +++ b/data/rbot/plugins/figlet.rb @@ -0,0 +1,24 @@ +#DEFAULT_FONT="smslant" +DEFAULT_FONT="rectangles" +MAX_WIDTH=68 + +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", "-w", "#{MAX_WIDTH}", "-f", DEFAULT_FONT, m.params) + return + end + end +end +plugin = FigletPlugin.new +plugin.register("figlet") |