Synopsis: addAlias( name, regExp, do, breakOn, isActive )
name : The alias's name.
(used by other functinos to access this alias)
regExp : Assume you typed a line. If line =~ regExp
the alias is "triggered".
do : If you give a string here, the line you typed
is processed like line =~ s/regExp/do/g, and
then printed to the server like usual.
If you specify a sub ref, then the sub is called
with line as it's argument. The sub's return value
is printed to the server like usual.
breakOn : 1, if the execution of aliases should stop if
this one matched, 0 otherwise (default = 0).
isActive: The initial alias state (default = 1).
(see setAliasState)
Example:
addAlias("My_Alias1", "^gg", "me's grinning...");
# this adds a alias which sends "me's grinning..."
# if you type "gg" at the input line