summaryrefslogtreecommitdiff
path: root/init.lua
blob: aefc9fd342309d576d3a7600867fe476097a6582 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
furrybot = {}

dofile(minetest.get_modpath("furrybot") .. "/bot.lua")

furrybot.http = minetest.request_http_api()
local env = assert(minetest.request_insecure_environment())

minetest.register_on_receiving_chat_message(function(msg)
	furrybot.recieve(msg)
end)

minetest.register_chatcommand("furrybot-reload", {
	func = function()
		furrybot.reload()
	end
})

function furrybot.reload()
	local func = env.loadfile("clientmods/furrybot/bot.lua")
	func()
end