I'm calling Execute from a plugin. The alias it calls does not seem to matter (more on this later). The result is a broken display like this:
ql
Sycamore hollow. (indoors)
\ /
--- Sycamore hollow ------ 4:-1:1 ---
6460h,4628m,29545e,23020w,exckdb=,nonea,Ii,Gv,18:11:22.53s,t,T,0R,546x-
Adding a call to print() function at the right place restores the proper appearance
ql
Sycamore hollow. (indoors)
test
test
Vines have overtaken this location. Muria of Eleusis is here, curled up by the fire. A runic totem is planted solidly in the ground. A large tapestry is here, displaying an elaborate world map. Averan stands here, her mouth pursed in a slight frown. There are 2 ebony bookshelves carved with sinuous dragons here. Lying flat on the ground is a key-shaped sigil. A solid oak bench rests here. There are 2 logosmas stockings here. A green tapestry of a stag and wolf is placed here. There are 2 birch bookshelves here. A plain green bookcase rests here. Peeking through the glass of an author's trunk, colourful tomes can be seen. A sigil in the shape of a small, rectangular monolith is on the ground. There are 3 indigo nightfire butterflies here.
test
You see a single exit leading north (closed door).
test
test
test
6460, 4628, 29545, 23020, exckdb-, 0S18:17:27.92
As a side remark: as you can see from the different in the prompt lines, the bug is preventing downstream triggers from firing (I have a trigger for gagging the prompt I receive and a script function for displaying the prompt I want).
The relevant section of the plugin is:
function OnPluginTelnetSubnegotiation (type, option)
if type ~= ATCP then
return
end -- not Achaea subnegotiation
local command, args = string.match (option, "^([%a.]+)%s+(.*)$")
if not command then
return
end -- don't seem to have a command
--ExecuteNoStack("handle_GMCP " .. command .. "=" .. args)
--ExecuteNoStack("handle_GMCP2 " .. command .. "=" .. args)
Execute("test")
--print("subnegotiation complete")
end -- function OnPluginTelnetSubnegotiation
Having print above Execute("test") and the result is broken output. Having a print() call anywhere downstream of Execute("test") - for example, in the ^test$ alias itself fixes the output.
The content and options on the alias does not seem to matter. This is what the ^test$ alias looks like:
<aliases>
<alias
match="^test$"
enabled="y"
regexp="y"
send_to="12"
keep_evaluating="y"
sequence="100"
>
<send>test = "success"
--print(test)</send>
</alias>
</aliases>
Varying the options (other than Enabled, of course) did not affect this bug.
I speculate that the problem might have to do with line not ending properly? Is there a version of print function that doesn't begin a new line, which might work as a temporary fix?
Thanks in advance.