|
rwagner76 Beginner
Joined: 03 Dec 2010 Posts: 15 Location: Wausau, WI
|
Posted: Mon Oct 22, 2018 2:15 am
Executing commands as if they were input directly |
Hi all,
I've been using something for years and I've never managed to make it perfect. I make use of a proxy between CMUD and my MUD. The proxy then allows me to connect with my phone/other remote device, and it passes commands back to CMUD for execution. This works relatively well, but one lingering thing continues to bother me years later.
I connect with my remote device, and I type: blah command here
The proxy sends to CMUD: {commandhere}blah command here
I have a trigger to grab {commandhere}($command:*), which just does #EXEC $command
The issue I have is if I use (), "", or some other chars, this gets either stripped, or the #EXEC doesn't do anything - I think this generally happens when I only use a single (.
Example: {commandhere}gossip I like these (those) things.
Local echo of $command has the () included.
Executed: gossip I like there those things.
Thoughts? Other ways to skin this cat?
-Rob |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Mon Oct 22, 2018 2:37 am |
you want #SEND or #SENDRAW i think
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
rwagner76 Beginner
Joined: 03 Dec 2010 Posts: 15 Location: Wausau, WI
|
Posted: Mon Oct 22, 2018 5:40 pm |
Unfortunately, if I use #SEND, I cannot use aliases in commands.
|
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Mon Oct 22, 2018 9:25 pm |
You would only need to use the #SEND in those examples with the odd characters.
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
rwagner76 Beginner
Joined: 03 Dec 2010 Posts: 15 Location: Wausau, WI
|
Posted: Tue Oct 23, 2018 11:58 am |
I'll have to consider if there are any situations where I am using aliases along with characters that are being dropped. Checking for characters and choosing send vs not _may_ work.
|
|
|
|
rwagner76 Beginner
Joined: 03 Dec 2010 Posts: 15 Location: Wausau, WI
|
Posted: Sat Oct 27, 2018 5:10 pm |
I was able to make this easy.
#if %defined(1st word) then #exec, else #send
Funny that such a thing bothered me so long. |
|
|
|
|
|