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 ➜ Suggestions ➜ GetAliasInfo addition?

GetAliasInfo addition?

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


Posted by WillFa   USA  (525 posts)  Bio
Date Sat 16 Mar 2002 07:24 PM (UTC)
Message
Instead of having a bazillion aliases to and fro, I'd prefer to have a bazillion to, and one fro. :)
So... I'd like to suggest another flag for the World.GetAliasInfo function.

13: Speedwalk BOOL returns whether or not an alias is a speedwalk alias.

What would be spiffy would be doing:

world.AddAlias ("ReverseSpeed", "^\.\.(\w)$", , eEnabled + eAliasRegularExpression, "doRunAwayRunAway")

Sub doRunAwayRunAway (strAliasLabel, strMatchedCommandLineText, arrStoredWildCards)
On Error Resume Next
Dim strAName

AName = arrStoredWildCards(1)
If World.IsAlias (AName)= 0 then

'''' The Below If Statement is Wishful Thinking '''
If World.GetAliasInfo (AName, 13) = TRUE then '13, proposed speedwalk check
World.Send World.ReverseSpeedWalk _
World.GetAliasInfo(AName, 2)
End If
End If
End Sub


No it's not really needed, but it's better to check to see if I'm trying to reverse some alias that has "We need news" or something in it. Better to plan on me being an idiot from time to time than to never be an idiot, right? :)
Top

Posted by WillFa   USA  (525 posts)  Bio
Date Reply #1 on Sat 16 Mar 2002 07:40 PM (UTC)
Message
Alternatively, having flag 13 return a long or something with all the flags that were specified could be even more versatile.

Dim Bitmask

Bitmask = World.GetAliasInfo(AName, 13)
If (BitMask AND eAliasSpeedWalk) <> 0 then
If (Bitmask AND eEnabled) = 0
World.Note "That Alias couldn't have brought you here... I'm not taking you back that way."
Else
World.Send World.Reverse....
End If

Ya, I know there's already a get alias info flag for enabled...
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #2 on Sun 17 Mar 2002 01:33 AM (UTC)
Message

You can already find that out with 'getalias'.

The flags are defined in the 'addalias' function page, namely AddAlias.

In other words, the flag mask 2048 is for 'interpret send string as a speed walk string'.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
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.


11,066 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.