2 local C = minetest.get_color_escape_sequence
3 local http = minetest.get_http_api()
5 local function send(msg, color)
6 minetest.send_chat_message("/me " .. C("#00FF3C") .. "[" .. C(color or "#FFFA00") .. msg .. C("#00FF3C") .. "]")
9 local function ping(player)
10 return C("#00DCFF") .. "@" .. player .. C("#FFFA00")
13 local function ping_player(player, message)
14 send(ping(player) .. ": " .. message)
17 local function ping_player_error(player, err, detail)
18 ping_player(player, C("#D70029") .. " " .. err .. " " .. (detail and C("#FF6683") .. "'" .. detail .. "'" .. C("#D70029") or "") .. ".")
21 local function player_online(name)
22 for _, n in ipairs(minetest.get_player_names()) do
29 minetest.register_on_receiving_chat_message(function(msg)
30 msg = minetest.strip_colors(msg)
31 if msg:find("<") == 1 then
32 local idx = msg:find(">")
33 local player = msg:sub(2, idx - 1)
34 local message = msg:sub(idx + 3, #msg)
35 if message:find("!") == 1 then
36 local args = message:sub(2, #message):split(" ")
37 local cmd = table.remove(args, 1)
38 local func = commands[cmd]
40 func(player, unpack(args))
42 ping_player_error(player, "Invalid command", cmd)
48 local function check_online(name, target)
49 if name == target then
50 ping_player_error(name, "You need to specify another player")
51 elseif player_online(target) then
54 ping_player_error(name, "Player not online", target)
58 function commands.furhug(name, target)
59 if check_online(name, target) then
60 send(name .. " hugs " .. target .. ".")
64 commands.furcuddle = commands.furhug
66 function commands.furkiss(name, target)
67 if check_online(name, target) then
68 send(name .. " kisses " .. target .. ".")
72 local target_list = {}
74 function commands.furbang(name, target)
75 if check_online(name, target) then
76 target_list[target] = function()
77 send(ping(name) .. " and " .. ping(target) .. " are having sex! OwO")
79 ping_player(target, name .. " wants to have sex with you. Type !accept to accept or !deny to deny.")
83 commands.fursex = commands.furbang
84 commands.furfuck = commands.furbang
86 function commands.accept(name)
87 local func = target_list[name]
91 ping_player_error(name, "Nothing to accept")
95 function commands.deny(name)
96 if target_list[name] then
97 target_list[name] = nil
98 ping_player(name, "Denied request")
100 ping_player_error(name, "Nothing to deny")
104 function commands.furhit(name, target)
105 if check_online(name, target) then
106 send(name .. " hits " .. target)
110 commands.furslap = commands.furhit
112 function commands.furhelp()
114 for k in pairs(commands) do
115 table.insert(keys, k)
117 send("Available commands: " .. table.concat(keys, ", "))
120 function commands.verse()
122 url = "https://labs.bible.org/api/",
123 data = "passage=random&type=json",