From e426586c250b1892162e9bef7a47cd607c12f661 Mon Sep 17 00:00:00 2001 From: Durel Date: Thu, 30 May 2019 10:19:22 -0400 Subject: [PATCH] Version 2.0051 1) Previously, dinv mistakenly treated items containing "%*" in their name as a formatting string during "dinv usage ..." requests. This could cause a dinv crash. 2) Dinv incorrectly toggled bprompt when it used telnet opts to toggle the main prompt while hiding background operations. As a result, doing dinv operations could mistakenly re-enable a user's bprompt even if they had manually turned bprompt off. --- aard_inventory.changelog | 13 +++++++++++++ aard_inventory.xml | 35 ++++++++++++++++------------------- 2 files changed, 29 insertions(+), 19 deletions(-) diff --git a/aard_inventory.changelog b/aard_inventory.changelog index ee989f2..670f788 100644 --- a/aard_inventory.changelog +++ b/aard_inventory.changelog @@ -2,6 +2,19 @@ dbot.changelog = {} +dbot.changelog[2.0051] = +{ + { change = drlDbotChangeLogTypeFix, + desc = [[Fixed a case where dinv mistakenly treated items containing "%*" in their name + as a formatting string during "dinv usage ..." requests causing a potential crash]] + }, + { change = drlDbotChangeLogTypeFix, + desc = [[Fixed a dinv bug that mistakenly toggled bprompt when dinv toggled the main + prompt. As a result, if a user disabled bprompt, using dinv could re-enable it + without the user's knowledge or consent.]] + } +} + dbot.changelog[2.0050] = { { change = drlDbotChangeLogTypeMisc, diff --git a/aard_inventory.xml b/aard_inventory.xml index 4dcfb9a..f21d509 100644 --- a/aard_inventory.xml +++ b/aard_inventory.xml @@ -89,7 +89,7 @@ dbot.version : Module to track version and changelog information and update the save_state="y" date_written="2017-08-12 08:45:15" requires="4.98" - version="2.0050" + version="2.0051" > @@ -1815,6 +1807,11 @@ of activity as the plugin shuffles items around. As a result, please be kind to those around you and find an out-of-the-way room for the build operation. Don't do this at recall! :) +If you do not have the identify wish, it may be beneficial for you to do +your build at Hester's room (from recall: runto ident). When you identify +something in Hester's room, you pay a small fee in gold, but you see a full +identification including fields you normally wouldn't (e.g., weapon damtype). + While the build executes, you are free to do your normal mudding activities. However, the build will halt if you sleep, go AFK, enter combat, or do something that puts you at a paging prompt so it's probably easiest if you @@ -17276,8 +17273,8 @@ function inv.usage.displayItem(priorityName, objId, doDisplayUnused) -- Display the result for this item/priority if it is used or if the user wants to display unused items if ((levelUsage ~= nil) and (#levelUsage > 0)) or doDisplayUnused then - dbot.print(string.format("%s%3d%s " .. formattedName .. itemType .. " " .. priorityName .. - " " .. levelStr, levelPrefix, itemLevel, levelSuffix)) + local formattedLevel = string.format("%s%3d%s ", levelPrefix, itemLevel, levelSuffix) + dbot.print(formattedLevel .. formattedName .. itemType .. " " .. priorityName .. " " .. levelStr) end -- if end -- inv.usage.displayItem @@ -20460,6 +20457,8 @@ function dbot.storage.loadTable(fileName, resetFn) return DRL_RET_INVALID_PARAM end -- if + --TODO: possibly replace spaces in file name with "\ "? + local shortName = string.gsub(fileName, ".*\\", "") dbot.debug("dbot.storage.loadTable: Loading \"@G" .. shortName .. "@W\"") @@ -21149,8 +21148,7 @@ function dbot.prompt.disable() -- could call multiple consecutive disables but we'd only do the disabling once. dbot.prompt.statusEnables = dbot.prompt.statusEnables - 1 if (dbot.prompt.statusEnables == 0) then - SendPkt(string.char (dbot.telnet.IAC, dbot.telnet.SB, 102, dbot.telnet.promptOption, - dbot.telnet.optionOff, dbot.telnet.IAC, dbot.telnet.SE)) + Execute("sendgmcp config prompt off") end -- if end -- if end -- dbot.prompt.disable @@ -21160,8 +21158,7 @@ function dbot.prompt.enable() if (dbot.prompt.statusEnables ~= nil) then dbot.prompt.statusEnables = dbot.prompt.statusEnables + 1 if (dbot.prompt.statusEnables == 1) then - SendPkt(string.char (dbot.telnet.IAC, dbot.telnet.SB, 102, dbot.telnet.promptOption, - dbot.telnet.optionOn, dbot.telnet.IAC, dbot.telnet.SE)) + Execute("sendgmcp config prompt on") end -- if end -- if end -- dbot.prompt.enable