|
GeneralStonewall Magician
Joined: 02 Feb 2004 Posts: 364 Location: USA
|
Posted: Tue Jul 27, 2010 9:44 am
[3.22] BUG: Oninput trigger calling alias with #send doubles output. |
Import the following, and use the oninput trigger: 'test input'
Code: |
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
<alias name="i_test" copy="yes">
<value>#print {i_test start}
#send {test: %1}
#print {i_test end}
</value>
</alias>
<trigger type="Command Input" priority="35770" regex="true" copy="yes">
<pattern>^test input$</pattern>
<value>i_test {blah}</value>
</trigger>
</cmud> |
Output:
Quote: |
i_test start
test: blah
i_test end
test: blah |
|
|
|
|
dbosst Apprentice
Joined: 15 Jun 2010 Posts: 121
|
Posted: Tue Jul 27, 2010 2:27 pm |
I just tested this with an empty session, but I couldn't reproduce it (Using 3.22 regular, not pro):
The output I got after executing "i_test blah" from the command line was the expected output:
Code: |
i_test start
test: blah
i_test end
|
EDIT: IGNORE THIS, see post below |
|
Last edited by dbosst on Tue Jul 27, 2010 5:58 pm; edited 1 time in total |
|
|
|
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Tue Jul 27, 2010 2:33 pm |
Confirmed, but very strange.
If you add the obligatory, to me at least, #noinput to the first line of the oninput trigger it doesn't happen.
It took me a few times running through the steps in my mind to convince myself that this was a bug. But I'm pretty sure that it is.
If it was supposed to double up everything then it should have this output.
i_test start
test: blah
i_test end
i_test start
test: blah
i_test end
But it doesn't it only doubles the test: blah part and that is clearly wrong.
*doh* ran the test with 3.21 downloading 3.22 now. |
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
|
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Tue Jul 27, 2010 2:46 pm |
Experiencing the same behavior with 3.22 both sets of tests were with pro.
Yes I am using a blank session. |
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
|
GeneralStonewall Magician
Joined: 02 Feb 2004 Posts: 364 Location: USA
|
Posted: Tue Jul 27, 2010 5:18 pm |
dbosst wrote: |
I just tested this with an empty session, but I couldn't reproduce it (Using 3.22 regular, not pro):
The output I got after executing "i_test blah" from the command line was the expected output:
Code: |
i_test start
test: blah
i_test end
|
|
Test using "test input" |
|
|
|
dbosst Apprentice
Joined: 15 Jun 2010 Posts: 121
|
Posted: Tue Jul 27, 2010 5:45 pm |
My mistake. I can confirm it...
...I just remembered I saw this bug a few versions ago but I completely forgot to report it... sorry!
My workaround was to just use #sendraw (it doesn't have this problem), and #echo to know I am actually sending it
also interestingly enough, I think it only affects the LAST #send in the script... because if you use this alias instead:
Code: |
#alias i_test {#print {i_test start}
#send {i_test1: %1}
#send {b}
#print {i_test end}}
|
you get this result, after doing 'test input' on command line:
Code: |
i_test start
i_test1: blah
b
i_test end
b
|
?looks like a stack issue / boundary problem to me..? |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue Jul 27, 2010 8:01 pm |
Technically, you need to have a #NOINPUT line in this script. Without #NOINPUT, the command that you type will also be sent to the server.
Now, I can see that this is also a bug since it should be sending "test input" to the MUD and not a second instance of "test: blah" so it looks like the #SEND command is interfering with sending the command to the MUD.
So I'll add this to the list, but I don't really consider it a high priority issue. |
|
|
|
|
|