beerchat support

This commit is contained in:
Freeman 2023-11-12 01:15:00 +01:00
parent a4f07ddba8
commit e295947043
2 changed files with 7 additions and 3 deletions

@ -105,11 +105,15 @@ function emeraldbank.transfer_emeralds(player1, player2, num)
if bankemeralds1 and bankemeralds1 >= num then
core.chat_send_player(name, S("Pay Successfully! You have transferred @1 Emeralds." , num))
core.chat_send_player(name2, S("Pay Successfully! You've gotten @1 Emeralds.", num))
local msg = S("@1 has transferred @2 emeralds to @3", name, num, name2)
if core.get_modpath("irc") then
irc.say(name.." has transferred "..num.." emeralds to "..name2)
irc.say(msg)
end
if core.get_modpath("yl_matterbridge") then
yl_matterbridge.send_to_bridge("", name.." has transferred "..num.." emeralds to "..name2)
yl_matterbridge.send_to_bridge("EMERALDBANK", msg)
end
if core.get_modpath("beerchat") and beerchat.send_on_channel then
beerchat.send_on_channel({name="EMERALDBANK", channel=freeman.beerchat_main_chan, message=msg})
end
emeraldbank.add_emeralds(player1, -num)
emeraldbank.add_emeralds(player2, num)

@ -1,5 +1,5 @@
name = emeraldbank
depends = mcl_core, mcl_sounds, mcl_inventory, mcl_formspec, mcl_title
optional_depends = irc, yl_matterbridge, pipeworks, digilines, awards, hopper, tell, email, mail
optional_depends = irc, yl_matterbridge, pipeworks, digilines, awards, hopper, tell, email, mail, beerchat
description = Keep your Emeralds in a bank! And trade with shops.
supported_games = mineclone2