Page 1 of 1
Last command sent
Posted: Wed Jun 15, 2011 6:56 am
by macro
what would be the simplest way to capture the last command sent? i made an alias with a send for now, but that will only capture what i manually type and will send even when another alias triggers as well
here is what i have currently:
pattern: ^(.*)
lastcommand = matches[1]
send(lastcommand, false)
if there was a way of telling it, "i know you triggered, but still send it to the server if the others do not trigger" that would be enough
Re: Last command sent
Posted: Wed Jun 15, 2011 11:04 am
by Heiko
You have full control over what is actually being sent over the network because there is a system event that is being raised whenever data is going to be sent over the network. You can hook up an event handler function that explicitly allows or denies the data send request.
Re: Last command sent
Posted: Wed Jun 15, 2011 12:02 pm
by Vadi
Re: Last command sent
Posted: Thu Jun 16, 2011 1:23 am
by macro
very awesome... does this also mean that 'command' is in the global variable list?
Re: Last command sent
Posted: Thu Jun 16, 2011 1:29 am
by Vadi
Yes, the variable is set when aliases are running
Re: Last command sent
Posted: Sun Jul 30, 2017 8:49 am
by GErswin
Bumping this because I have a related question that's probably not worth its own thread.
When I start up Mudlet and connect to my MUD, the MUD immediately returns some errors about unrecognized commands being sent. Obviously Mudlet is sending something but I don't know what. What's the best way for me to see what commands Mudlet has sent since startup? I tried getLines but that only returns visible lines.
Re: Last command sent
Posted: Sun Jul 30, 2017 8:16 pm
by Nyyrazzilyss
Re: Last command sent
Posted: Mon Jul 31, 2017 2:09 am
by GErswin
Got it. That helped me to see what the issue was. Thanks!