Skip to content

Commit

Permalink
Send system messages on default channel (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
Emojigit authored May 9, 2024
1 parent 5381007 commit 4b146cc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions web/tx.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ minetest.register_on_joinplayer(function(player)
new_player_map[playername] = nil
end

beerchat.on_channel_message("main", playername, msg)
beerchat.on_channel_message(beerchat.main_channel_name, playername, msg)
end)

-- leave player message
Expand All @@ -59,12 +59,12 @@ minetest.register_on_leaveplayer(function(player, timed_out)
msg = msg .. " (timed out)"
end

beerchat.on_channel_message("main", player:get_player_name(), msg)
beerchat.on_channel_message(beerchat.main_channel_name, player:get_player_name(), msg)
end)

-- initial message on start
beerchat.on_channel_message("main", "SYSTEM", "✔ Minetest started!")
beerchat.on_channel_message(beerchat.main_channel_name, "SYSTEM", "✔ Minetest started!")

minetest.register_on_shutdown(function()
beerchat.on_channel_message("main", "SYSTEM", "✖ Minetest shutting down!")
beerchat.on_channel_message(beerchat.main_channel_name, "SYSTEM", "✖ Minetest shutting down!")
end)

0 comments on commit 4b146cc

Please sign in to comment.