[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Bug reports
. . -> [Subject]  Aliases echo original typed text

Aliases echo original typed text

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Vaejor   (120 posts)  [Biography] bio
Date Wed 16 Apr 2003 01:45 PM (UTC)

Amended on Wed 16 Apr 2003 01:46 PM (UTC) by Vaejor

Message
Version 3.37 seems to be causing aliases to echo the data that was typed in although not sending it to the server.

After this point it does correctly process and execut the alias.

'Omit from output' stil leaves the original typed text echoing to the screen and only stops the processed data from echoing.
[Go to top] top

Posted by Shadowfyr   USA  (1,786 posts)  [Biography] bio
Date Reply #1 on Wed 16 Apr 2003 07:12 PM (UTC)
Message
Yes this is a bit annoying.. Ex:

Type alias: summ

Display:
summ
summon animal

It is nice to have it now echo the command when a script is called, but it shouldn't also echo when you are specifically replacing the command using the send field.
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #2 on Wed 16 Apr 2003 10:17 PM (UTC)
Message
Ah yes, I thought someone would comment on that. :)

That's not a bug, that's a feature!

Let me explain - while I was testing the chat plugin, I was typing "#chats" and seeing a list of chats on the screen, but the "#chats" command was nowhere to be seen. Aha, I thought, a bug introduced recently in 3.35 probably, I was expecting something like that.

I checked the settings, the "echo commands" was set, and the "omit from output" for the "#chats" alias was not set, so it was reasonable to see the alias, I thought, because otherwise you might not know you had typed anything, or if you had typed something, what it was.

Then I thought "alias - omit from output" option - omit *what* from output? The alias itself? Or its results? In your example, Shadowfyr, should "omit from output" omit "summ" or "summon animal"?

So I clicked the Help button for the alias, and read my own help file - it said Omit From Output omitted the alias "send text", so I changed the code to do exactly that.

The short answer, then, is that it is doing what it is documented to do. However I recognise that there are probably people relying on the old behaviour.

If it is a problem, and I gather it is, we probably need a second option "omit alias itself from output". Then you can set whichever ones you want. Do you agree?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Shadowfyr   USA  (1,786 posts)  [Biography] bio
Date Reply #3 on Wed 16 Apr 2003 10:42 PM (UTC)

Amended on Wed 16 Apr 2003 10:53 PM (UTC) by Shadowfyr

Message
Umm. Yeah.. A new option would definitely be a good idea. It mades sense the way it used to work imho, since the command you where sending was 'summon animal', not the alias 'summ'. I want to know what I am telling the mud to do, not what alias I used to do it. For a few cases the change is actually helpful, since it didn't show anything, but this change breaks 'every' existing alias used by anyone. Maybe an option to 'show alias in output' would be better, since it is a behavour you want to turn on 'when you need it', not as the default behaviour, which this change severely trashes. Not sure if there are cases where you want 'omit from output' and 'show alias' though, so maybe it should not be a drop down option, since you then force people to pick between several choices that exclude useful combinations. As it is though, I could bloody well care less whether I can see the chat commands displayed if it makes my other 115 aliases work 'wrong', not including all the ones in plugins I would have to change to get rid of this 'fixed' behaviour. Think you opened a big can of worms with this one Nick. ;)
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #4 on Wed 16 Apr 2003 10:50 PM (UTC)
Message
Is this really the behaviour everyone expects? That an alias is never echoed? Seems strange, really. There must be aliases that just call scripts, or set variables. Is everyone used to them never echoing? How do you know you did it?

How about changing the default to:

Echo the alias itself, unless the alias does a "send to world", "send to queue", or "send to speedwalk" in which case show the "send to world" text, unless "omit from output" is checked.

In other words, suppress the alias for those cases that cause the "are we connected to the world right now" test to be done.

Plus, perhaps add an option "show alias" so you can check that to see the alias if you really want to.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Flannel   USA  (1,230 posts)  [Biography] bio
Date Reply #5 on Wed 16 Apr 2003 11:27 PM (UTC)

Amended on Wed 16 Apr 2003 11:36 PM (UTC) by Flannel

Message
In 3.34 (which I was using, until I upgraded to 3.37 yesterday), I had an alias (two actually, but thats besides the point) which set a variable, sent values to a variable, and that alias was echo'd as a command...

So nick, about your last post, with the aliases that JUST call scripts, or set variables, you might want to double check that they werent being echo'd in 3.34. Since mine seemed to.

I agree though, if we're to keep this the way it is, the option should be to echo it, since by default, people dont care what they type, only what is sent to mud, in this case.

My main point was though, that the alias I had (I can copy it here if you want), DID echo, even though nothing was sent to mud.

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
[Go to top] top

Posted by Shadowfyr   USA  (1,786 posts)  [Biography] bio
Date Reply #6 on Wed 16 Apr 2003 11:29 PM (UTC)
Message
Initially I thought this was a good start. However.. The option to turn it back on for special cases is imho dumb. If it worked then you see the sent text and 'know' it worked anyway. For script I generaly added messages like:

Reconnect on Disconnect is now ON

or

Quit is OFF

rather than rely on the fact that I know the alias did something, but couldn't be entirely sure that it did what it was supposed to. Probably 90% of my aliases are ones that do replacements, the rest call script, all of which give me some sort of message to tell me that they did what I wanted them to. For the ones that call script I would like to see the actually command yes (in some cases), but the other 90% are ones where I am seeing the result as a list of sent commands and I don't need to see the alias. So yes, this is definitely the 'expected' behaviour. ;)

Now consider this case where I don't want to see the alias when calling a script:

<aliases>
<alias
name="Sur_Send"
script="Surname"
match="^(cle|newbie|ghost|he|sales|dr|gossip|bs|hero|aod|bardic) (:|\;)?(.*)"
enabled="y"
regexp="y"
>
</alias>
</aliases>

sub Surname(name, output, wilds)
dim MyName
Myname = "Kossori"
select case wilds(2)
case ":"
world.send wilds(1) & " " & ":" & MyName & " " & wilds(3)
case ";"
world.send wilds(1) & " " & ";" & wilds(3)
case else
world.send wilds(1) & " " & ":" & MyName & ": " & wilds(3)
end select
end sub

The result of this would be:

alias -> bs Hello!
sent -> bs :Kossori: Hello!
from mud -> [bs] Kagehi Kossori: Hello!

Not a big deal? How about if it was 4 lines of text instead, then you get 4 lines of alias, 4 lines of script sent stuff and 5-6 lines of indented return text from the mud, for a grand total of 13-14 lines of junk in the output, 1/3 of which is 'completely' redundant. This is not good no matter how you try to justify it.

Like I said, I would prefer the option to 'turn on' display of the actually typed alias 'when needed'. Having it always on or only turning it off for those things that 'seem' likely to be good to do breaks too many things that, like the case above, can't be fixed with any of the possible options you might provide to fix them. And it is these kinds of things that are probably in the majority of uses for aliases, not the minority.
[Go to top] top

Posted by Linda   Sweden  (164 posts)  [Biography] bio
Date Reply #7 on Thu 17 Apr 2003 12:05 AM (UTC)
Message
I don't quite follow all the technicalities of the discussion, but I would definitely want a way to get it back to the way it used to work. I tend to use an alias shortcut for @emits when RPing and I prefer to not have either the alias or the output echoed at all since it just gets too spammy. Previously, just turning off omit from output did it fine, but now I still get the original input.
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #8 on Thu 17 Apr 2003 12:07 AM (UTC)

Amended on Thu 17 Apr 2003 12:08 AM (UTC) by Nick Gammon

Message
Flannel, you are right. It seems in 3.34 aliases that set a variable were echoed, however in most (all)? other cases they were not. This is pretty inconsistent in itself.

Shadowfyr, I don't have any objection to changing it, and soon, but I want to have a good idea of what the default behaviour should be.

I think to just "change it back" is no good - I *want* to see my aliases under some circumstances. eg. An alias that sets a variable, but doesn't do anything else, like calling a script, it would be nice to see a visual record you did it.

eg. target kobold

I suggest a second flag: Echo Alias.

Now the simple thing is to make it default to off, which means existing world files will be OK, off is the default for options which are not present.

Then, for aliases that you want to see echoed, you explicitly set that option.

This also means your existing worlds will default back to the usual behaviour - which I gather is that you are not expecting the alias to be echoed - excepting those few that set variables. It shouldn't be too big a hardship to set those manually, if required.

I suppose the next question is, which takes precedence, if you have "echo commands" (all commands) off? Do aliases still get echoed? Let's assume not, because aliases are, in effect, commands?

So, the rule would be:

An alias itself (not what it sends) would be echoed to the screen if:

The aliases own "Echo Alias" flag is on AND the world's "echo commands" flag is on.

The alias contents (what is sent to the MUD) is echoed UNLESS the "omit from output" flag for that alias is set.

Is everyone happy with that?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Shadowfyr   USA  (1,786 posts)  [Biography] bio
Date Reply #9 on Thu 17 Apr 2003 12:12 AM (UTC)
Message
Yes. That will work nicely. ;)
[Go to top] top

Posted by Vaejor   (120 posts)  [Biography] bio
Date Reply #10 on Thu 17 Apr 2003 12:14 AM (UTC)
Message
I'll have to vote initially for returning primarily to the old method.

It would make it easier to display something for aliases that don't normally have any output, but it would simply replace what you can already do if you wanted to.

If you're running a script only, you should be able to toss in a world.tell or world.note (if you are scripting, this should be fairly simple to add to). If you don't have anything in the alias itself to send, you could just switch it to 'send to output' and let it redisplay data that way.

As far as making it default behavior for an alias without any world.send (or world.note/world.tell?) to force the original input to echo to the screen? I do think that could be useful. The only thing I can see at the moment that would cause no output and make it difficult to display anything simply would be the alias; send to variable ability. There are probably other things as well.

At that point, it could be put in as a global option. maybe 2 of them: 'Echo alias input to screen' and 'Echo alias input to screen when no resulting output'. The first defaults to off, the second to on.
[Go to top] top

Posted by Vaejor   (120 posts)  [Biography] bio
Date Reply #11 on Thu 17 Apr 2003 12:20 AM (UTC)
Message
Hmm, I should probably recheck messages before waiting 15 minutes to post.

woo me. ;)
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #12 on Thu 17 Apr 2003 07:44 AM (UTC)
Message
Should work OK now in version 3.38 - try that.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


26,345 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]