Skip to content

Commit

Permalink
move crashing code
Browse files Browse the repository at this point in the history
  • Loading branch information
fiendish committed Nov 3, 2023
1 parent 661a919 commit 4698c8e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 17 deletions.
4 changes: 4 additions & 0 deletions MUSHclient/AardwolfPackageChanges.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Aardwolf Client Package Major Changes List

r2279 snapshot
- new feature: The miniwindow health bars are now re-orderable.
- bug fix: (maybe?) Moves some code that causes a crash during start sometimes to a place where it seems less likely to cause a crash. Not sure what's up, but the library call appears to be a bit fragile.

r2277 snapshot
- bug fix: Addresses (maybe?) a complaint about sense anger losing an expected blank line because of how the ASCII map plugin requests a new overhead map update.
- bug fix: The July 15 2023 reboot changed the format of powerup notifications, so the soundpack and review buffers plugins have been updated. (Thanks Areia!)
Expand Down
33 changes: 16 additions & 17 deletions MUSHclient/worlds/plugins/aard_GMCP_handler.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,23 +101,6 @@ require "gmcphelper"
initialized = false
luacom = require "luacom"
if luacom then
wshell = luacom.CreateObject("WScript.Shell")
end
if wshell then
rr = wshell.RegRead
rw = wshell.RegWrite
end
if rr and rw then
ident_ok, ident = pcall(rr, wshell, "HKCU\\Software\\AardwolfMUSHclient\\Ident")
if not ident_ok then
pcall(rw, wshell, "HKCU\\Software\\AardwolfMUSHclient\\Ident", CreateGUID(), "REG_SZ")
ident_ok, ident = pcall(rr, wshell, "HKCU\\Software\\AardwolfMUSHclient\\Ident")
end
end
ident = ident_ok and ident or "{ident failed}"
function OnPluginListChanged()
dofile "lua/aard_requirements.lua"
end
Expand Down Expand Up @@ -295,6 +278,22 @@ function OnPluginTelnetRequest (msg_type, data)
end -- if
if msg_type == GMCP and data == "SENT_DO" then
luacom = require "luacom"
if luacom then
wshell = luacom.CreateObject("WScript.Shell")
end
if wshell then
rr = wshell.RegRead
rw = wshell.RegWrite
end
if rr and rw then
ident_ok, ident = pcall(rr, wshell, "HKCU\\Software\\AardwolfMUSHclient\\Ident")
if not ident_ok then
pcall(rw, wshell, "HKCU\\Software\\AardwolfMUSHclient\\Ident", CreateGUID(), "REG_SZ")
ident_ok, ident = pcall(rr, wshell, "HKCU\\Software\\AardwolfMUSHclient\\Ident")
end
end
ident = ident_ok and ident or "{ident failed}"
-- This hard-coded block may need to be made into a config table as we add more message types.
Send_GMCP_Packet (
string.format ('Core.Hello { "client": "MUSHclient", "version": "%s", "ident": "%s" }',
Expand Down

0 comments on commit 4698c8e

Please sign in to comment.