]> git.lizzy.rs Git - furrybot.git/blob - init.lua
Hot reloading working; tweaked command names
[furrybot.git] / init.lua
1 furrybot = {}
2
3 dofile(minetest.get_modpath("furrybot") .. "/bot.lua")
4
5 local env = assert(minetest.request_insecure_environment())
6
7 minetest.register_on_receiving_chat_message(function(msg)
8         furrybot.recieve(msg)
9 end)
10
11 minetest.register_chatcommand("furrybot-reload", {
12         func = function()
13                 furrybot.reload()
14         end
15 })
16
17 function furrybot.reload()
18         local func = env.loadfile("clientmods/furrybot/bot.lua")
19         func()
20 end