summaryrefslogtreecommitdiff
path: root/bullshit.lua
diff options
context:
space:
mode:
authorElias Fleckenstein <eliasfleckenstein@web.de>2021-11-12 14:39:15 +0100
committerElias Fleckenstein <eliasfleckenstein@web.de>2021-11-12 14:39:15 +0100
commit19cd4e7ea97d08d61b5ba650a471bbd2e814d779 (patch)
tree78aeec5b2be9c5f7519554ad936405c68c40f637 /bullshit.lua
parentd4da90fada58be5eda399795ffbc82a1365d348b (diff)
downloadfurrybot-19cd4e7ea97d08d61b5ba650a471bbd2e814d779.tar.xz
Structure overhaul
Diffstat (limited to 'bullshit.lua')
-rw-r--r--bullshit.lua13
1 files changed, 8 insertions, 5 deletions
diff --git a/bullshit.lua b/bullshit.lua
index aa53d73..227f58a 100644
--- a/bullshit.lua
+++ b/bullshit.lua
@@ -53,11 +53,14 @@ END {
}
]]
-function furrybot.commands.bullshit(name)
- local pf = env.io.popen("awk '" .. bullshit_code .. "' clientmods/furrybot/bullshit", "r")
- local bullshit = pf:read("*a")
- furrybot.ping_message(name, bullshit:sub(1, #bullshit - 2), furrybot.colors.system)
-end
+furrybot.commands.bullshit = {
+ help = "Output some random bullshit (ported from the plan9front system)",
+ func = function(name)
+ local pf = env.io.popen("awk '" .. bullshit_code .. "' clientmods/furrybot/bullshit", "r")
+ local bullshit = pf:read("*a")
+ furrybot.send(bullshit:sub(1, #bullshit - 2), furrybot.colors.system)
+ end,
+}
return function(_http, _env, _storage)
http, env, storage = _http, _env, _storage