command, ";"
Posted: Thu Jul 13, 2017 4:48 pm
Question:
The command separator for multiple commands sent on the same line is "command1;command2"
Right after someone types that, I receive a response from the mud. In that trigger, when it looks at the 'command' variable the contents of it will be 'command2'. How would I find 'command1', or the full "command1;command2" line typed?
(edit)
It looks like I might be able to somewhat figure this out using the 'sysDataSendRequest' event.
The above worked to create a global 'command2' holding the command prior to 'command'. Obviously better would be a table holding a lot more history on commands. The help entry mentioned to not misuse the event and use it as a keylogger, however, in effect that's exactly what i'm doing in creating a usable command history.
The command separator for multiple commands sent on the same line is "command1;command2"
Right after someone types that, I receive a response from the mud. In that trigger, when it looks at the 'command' variable the contents of it will be 'command2'. How would I find 'command1', or the full "command1;command2" line typed?
(edit)
It looks like I might be able to somewhat figure this out using the 'sysDataSendRequest' event.
Code: Select all
function onNetworkOutput(__, xcommand)
command2 = commandSent
commandSent=xcommand
end