summaryrefslogtreecommitdiff
path: root/data/rbot/contrib/plugins/figlet.rb
diff options
context:
space:
mode:
authorTom Gilbert <tom@linuxbrit.co.uk>2005-07-27 15:59:13 +0000
committerTom Gilbert <tom@linuxbrit.co.uk>2005-07-27 15:59:13 +0000
commit21949774b91eaec6ecde4eaa8ad121e2c0a36b87 (patch)
tree41a7601e168018ac203bad7ca8d7f9f82515bc28 /data/rbot/contrib/plugins/figlet.rb
parent51cf09ec02d089bfdd80e5f728cfc92a234dc437 (diff)
rearrange repo for packaging
Diffstat (limited to 'data/rbot/contrib/plugins/figlet.rb')
-rw-r--r--data/rbot/contrib/plugins/figlet.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/data/rbot/contrib/plugins/figlet.rb b/data/rbot/contrib/plugins/figlet.rb
new file mode 100644
index 00000000..ce17fe71
--- /dev/null
+++ b/data/rbot/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")