From e8cc263c8aff27f3fb2849655cabdda412e89170 Mon Sep 17 00:00:00 2001 From: Tom Gilbert Date: Fri, 20 Jan 2006 09:29:28 +0000 Subject: another plugin from Chris --- data/rbot/plugins/figlet.rb | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 data/rbot/plugins/figlet.rb (limited to 'data') 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 [] => 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") -- cgit v1.2.3