Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
rwagner76
Beginner


Joined: 03 Dec 2010
Posts: 15
Location: Wausau, WI

PostPosted: 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
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4691
Location: Pensacola, FL, USA

PostPosted: Mon Oct 22, 2018 2:37 am   
 
you want #SEND or #SENDRAW i think
_________________
Discord: Shalimarwildcat
Reply with quote
rwagner76
Beginner


Joined: 03 Dec 2010
Posts: 15
Location: Wausau, WI

PostPosted: Mon Oct 22, 2018 5:40 pm   
 
Unfortunately, if I use #SEND, I cannot use aliases in commands.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4691
Location: Pensacola, FL, USA

PostPosted: Mon Oct 22, 2018 9:25 pm   
 
You would only need to use the #SEND in those examples with the odd characters.
_________________
Discord: Shalimarwildcat
Reply with quote
rwagner76
Beginner


Joined: 03 Dec 2010
Posts: 15
Location: Wausau, WI

PostPosted: 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.
Reply with quote
rwagner76
Beginner


Joined: 03 Dec 2010
Posts: 15
Location: Wausau, WI

PostPosted: 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.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net