Skip to content

Commit

Permalink
Merge pull request #227 from fiendish/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
fiendish committed Nov 18, 2015
2 parents cf6bedd + 74dfca5 commit 5abe88e
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 18 deletions.
5 changes: 5 additions & 0 deletions MUSHclient/AardwolfPackageChanges.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
Aardwolf Client Package Major Changes List

r1842 snapshot:
- bug fix: update plugin now seen working in Windows XP. Wine's xcopy prints "<#> file(s) copied" with a lowercase f, but Windows's xcopy prints "<#> File(s) copied" with a capital F.
- misc change: confirm at package update whether to update in place or to download the .zip instead
- new feature: mapper notes room (or mapper notes thisroom) will print mapper notes for just the current room

r1840 snapshot:
- bug fix: hopefully fix bad github merge

Expand Down
1 change: 0 additions & 1 deletion MUSHclient/worlds/plugins/Aardwolf_Bigmap_Graphical.xml
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,6 @@ function do_init()
font_id = "bigmap_font" -- our internal name
font_id_bold = "bigmap_font_bold" -- our internal name
print(mapwin)
check (WindowFont (mapwin, font_id, font_name, font_size, false, false, false, false, 0, 49)) -- normal
font_height = WindowFontInfo (mapwin, font_id, 1) - WindowFontInfo (mapwin, font_id, 4) + 1 -- height
Expand Down
32 changes: 21 additions & 11 deletions MUSHclient/worlds/plugins/aard_GMCP_mapper.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3870,20 +3870,30 @@ function map_notes (name, line, wildcards)
local q = string.format ("SELECT bookmarks.uid as uid, bookmarks.notes as notes FROM bookmarks")
if area ~= "" then
if area == "here" then
res, gmcparg = CallPlugin("3e7dedbe37e44942dd46d264","gmcpval","room.info")
luastmt = "gmcpdata = " .. gmcparg
assert(loadstring (luastmt or "")) ()
area = gmcpval("zone")
mapper.mapprint("Searching the current area")
if area == "room" or area == "thisroom" then
if not current_room then
mapper.mapprint("I don't know where you are right now - try: LOOK")
return
else
mapper.mapprint("Searching areas that partially match '"..area.."'")
area = "%"..area.."%"
mapper.mapprint("Searching the current room")
q = q..",rooms where bookmarks.uid=rooms.uid and rooms.uid="..fixsql(current_room)
end
q = q..",rooms where bookmarks.uid=rooms.uid and rooms.area like "..fixsql(area)
else
mapper.mapprint("Searching all areas")
if area ~= "" then
if area == "here" then
res, gmcparg = CallPlugin("3e7dedbe37e44942dd46d264","gmcpval","room.info")
luastmt = "gmcpdata = " .. gmcparg
assert(loadstring (luastmt or "")) ()
area = gmcpval("zone")
mapper.mapprint("Searching the current area")
else
mapper.mapprint("Searching areas that partially match '"..area.."'")
area = "%"..area.."%"
end
q = q..",rooms where bookmarks.uid=rooms.uid and rooms.area like "..fixsql(area)
else
mapper.mapprint("Searching all areas")
end
end
-- build table of special places (with info in them)
Expand Down
18 changes: 12 additions & 6 deletions MUSHclient/worlds/plugins/aard_package_update_checker.xml
Original file line number Diff line number Diff line change
Expand Up @@ -236,15 +236,18 @@ function checkIfFinishedDownloading()
wait.make(function()
wait.time(DELAY)
print("")
print("Done saving update files!")
print("Done downloading update files!")
print("")
if IsConnected() then
print("Disconnecting to perform update...")
print("")
Disconnect()
end
Save()
print("Saving world settings")
print("")
Repaint()
Save()
wait.time(DELAY)
ColourNote("white", "black", "+---------------------------------","red","black"," Touch Nothing ","white","black","-------------------------------+")
Expand Down Expand Up @@ -300,7 +303,7 @@ function checkIfFinishedDownloading()
local err, execute_lines = osexecute("xcopy \""..GetInfo(66).."update_tmp\" \"".. string.gsub(GetInfo(66),"\\$","").."\" /s /v /y /f")
if err ~= 0 or not execute_lines[#execute_lines] or not string.find(execute_lines[#execute_lines], tostring(#fetch_list).." file%(s%) copied") then
if err ~= 0 or not execute_lines[#execute_lines] or not string.find(execute_lines[#execute_lines]:lower(), tostring(#fetch_list).." file%(s%) copied") then
ColourNote("white", "red", "Package Update ERROR (while replacing files)")
for i,v in ipairs(execute_lines) do
ColourNote("yellow", "red", v) -- flaming output
Expand All @@ -315,7 +318,7 @@ function checkIfFinishedDownloading()
Note()
result = utils.msgbox( "MUSHclient has finished updating and needs to be restarted. Exit the program now?", "Restart MUSHclient!", "yesno", "!", 1)
if result == "yes" then
result = utils.msgbox( "Save world before exiting?", "Save", "yesno", "?", 1 )
result = utils.msgbox( "Save world again before exiting?", "Save", "yesno", "?", 1 )
if result == "yes" then
Save()
end
Expand Down Expand Up @@ -361,8 +364,11 @@ end
-- the newest available download and the currently downloaded package
function updateDialog(message,list)
if utils.editbox(message,window_title,list,nil,nil,{ok_button="Ok, Install It", cancel_button="Ignore", read_only=true, no_default=true}) then
-- browse(download_url)
async.doAsyncRemoteRequest("https://api.github.com/repos/fiendish/aardwolfclientpackage/git/trees/MUSHclient?recursive=1", doUpdate, "HTTPS", 120)
if utils.msgbox("This plugin can optionally try to perform the full upgrade for you so that you don't have to do anything except wait, watch, and then eventually restart MUSHclient. \n\nCaution: The code for this may be broken or incomplete, or it may just not work. If you're unsure, choose No, quit MUSHclient, backup your whole directory, then come back and do \"package update check\" again.\n\nWould you like to try installing automatically instead of making you do it manually?\n\n (choosing No will just download .zip archive)", "Try to install in place?", "yesno", "?", 2) == "yes" then
async.doAsyncRemoteRequest("https://api.github.com/repos/fiendish/aardwolfclientpackage/git/trees/MUSHclient?recursive=1", doUpdate, "HTTPS", 120)
else
browse(download_url)
end
else
Note("")
ColourNote("cyan", "", "+--------------------------------------------------------------------------+")
Expand Down

0 comments on commit 5abe88e

Please sign in to comment.