server: /give: show the actual stackstring
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>
Sat, 11 Feb 2012 02:16:44 +0000 (03:16 +0100)
committerJonathan Neuschäfer <j.neuschaefer@gmx.net>
Fri, 24 Feb 2012 22:27:01 +0000 (23:27 +0100)
data/mods/default/init.lua

index f11b611003f0e092bb81843381d670690c5afa43..76c07d8258702ad840b7ea8862dc079b1e28653a 100644 (file)
@@ -1778,6 +1778,9 @@ local function handle_give_command(cmd, giver, receiver, stackstring)
        else
                partiality = "partially "
        end
+       -- The actual item stack string may be different from what the "giver"
+       -- entered (e.g. big numbers are always interpreted as 2^16-1).
+       stackstring = itemstack:to_string()
        if giver == receiver then
                minetest.chat_send_player(giver, '"'..stackstring
                        ..'" '..partiality..'added to inventory.');