Adding i new alias with AddAlias in lua

Posted by Jedhi on Sat 17 May 2014 09:31 AM — 4 posts, 18,513 views.

#0
Hello,

i do not understand alias flags. how can i make alias both enabaled and using regular expression?

AddAlias(
'someName',
'the command',
'say testing',
1
)

1 will enable. how to add other flags?

i want to use this function so i do not have to add stuff in the xml format.
Australia Forum Administrator #1
You add them together like this:


AddAlias(
'someName',
'the command',
'say testing',
1 + 128
)


For better documentation use the built-in names, eg.


AddAlias(
'someName',
'the command',
'say testing',
alias_flag.Enabled + alias_flag.RegularExpression
)


These are documented here:

Template:function=AddAlias
AddAlias

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

Amended on Sat 17 May 2014 08:26 PM by Nick Gammon
Australia Forum Administrator #2
Remember, if you are replacing an existing alias of the same name, use the "Replace" flags as well.
#3
Super! Thank you.