Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ General ➜ Sometimes omit alias from output

Sometimes omit alias from output

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


Posted by Areadien   USA  (47 posts)  Bio
Date Fri 16 Feb 2018 11:57 PM (UTC)
Message
Hello,

I would like to create a conditional omit_from_output for an alias. I have everything else gagged properly, but when I execute a certain alias only when a certain variable is set to true. Here's my code so far.

<aliases>
    <alias enabled="y" match="^cont$" omit_from_output="y" regexp="y" send_to="12" sequence="100">
        <send>continue()</send>
    </alias>
</alias>

function continue()
    if varSet == true then
        Send("c") --I want this gagged in this instance, and not any other time I send "c"
    end
end


I have other functions that set the variable to true or false, and they're attached to a trigger.
Top

Posted by Nick Gammon   Australia  (23,166 posts)  Bio   Forum Administrator
Date Reply #1 on Sat 17 Feb 2018 05:06 AM (UTC)
Message
The "omit from output" just omits the alias being echoed in the output window (for you to see), it doesn't stop it doing what it is going to do.

You can do SendNoEcho to send to the MUD and not echo in the output window.

Template:function=SendNoEcho SendNoEcho

The documentation for the SendNoEcho script function is available online. It is also in the MUSHclient help file.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Areadien   USA  (47 posts)  Bio
Date Reply #2 on Mon 19 Feb 2018 09:11 PM (UTC)
Message
Yeah, I wanted it to not show for me under a specific circumstance.

I figured out how to do this, though. What I did was I made a second alias to be fired under that circumstance, and I've set it to omit_from_output="y".
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.


14,198 views.

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

Go to topic:           Search the forum


[Go to top] top

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