diff --git a/functions.lua b/functions.lua index f176fd3..76ee824 100644 --- a/functions.lua +++ b/functions.lua @@ -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) diff --git a/mod.conf b/mod.conf index 5fb1069..c347eac 100644 --- a/mod.conf +++ b/mod.conf @@ -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