GetAliasInfo addition?

Posted by WillFa on Sat 16 Mar 2002 07:24 PM — 3 posts, 11,278 views.

USA #0
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? :)
USA #1
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...
Australia Forum Administrator #2

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'.