]> git.lizzy.rs Git - furrybot.git/blobdiff - init.lua
Japanese waifu names
[furrybot.git] / init.lua
index aefc9fd342309d576d3a7600867fe476097a6582..76397be3cc280cdee8cc4cdbce691535f76e249a 100644 (file)
--- a/init.lua
+++ b/init.lua
@@ -1,21 +1,15 @@
 furrybot = {}
 
-dofile(minetest.get_modpath("furrybot") .. "/bot.lua")
+local path = minetest.get_modpath("furrybot")
 
-furrybot.http = minetest.request_http_api()
-local env = assert(minetest.request_insecure_environment())
+utf8 = dofile(path .. "/utf8.lua")
 
-minetest.register_on_receiving_chat_message(function(msg)
-       furrybot.recieve(msg)
-end)
+local http = minetest.request_http_api()
+local env = minetest.request_insecure_environment()
+local storage = minetest.get_mod_storage()
 
-minetest.register_chatcommand("furrybot-reload", {
-       func = function()
-               furrybot.reload()
-       end
-})
+libclamity.register_on_chat_message(function(...)
+       furrybot.parse_message(...)
+end)
 
-function furrybot.reload()
-       local func = env.loadfile("clientmods/furrybot/bot.lua")
-       func()
-end
+loadfile(path .. "/bot.lua")()(http, env, storage)