mIRC Homepage
Posted By: Zonk Alias "alias" - 06/09/04 01:05 PM
This is not really a bug imo, just wanted to know if theres a reason for this kinda strange behaviour..

If I add
alias alias halt
in remote, and i then try /alias bla blub
its not working -> nothing is happening

thats fine so far
but then i try the same thingie in aliases, where I add
alias halt

This doesnt stop /alias bla blub from working
It treats it like im doing /!alias bla blub
any specific reason for that?

[Tested on XP mIRC 6.16]
Posted By: Armada Re: Alias "alias" - 06/09/04 02:43 PM
Quote:
/alias [filename] <aliasname> <command>
Adds, removes, replaces aliases; it is limited to single line aliases and will not affect mutiple line definitions.

/alias /moo /me moos!

This will replace the first matching alias with the new command. To remove an existing aliases:

/alias /moo

To add an alias to a specific alias file, you would use:

/alias moo.txt /moo /me moos!

If you don't specify a filename, it defaults to using the first filename in which the alias exists, or if it doesn't exist then it uses the first loaded aliases file.


Doesnt work cause its a internal mirc command
Posted By: dr_Eamer Re: Alias "alias" - 06/09/04 05:21 PM
Aliases (unlike custom identifiers) may override mirc internal commands! That's why there's a '!' command prefix!

I confirm the strange behaviour. "Alias alias" works in the remotes section but not in the aliases.
Posted By: coolspot Re: Alias "alias" - 07/09/04 06:07 AM
I don't think '!' is what tells mIRC to overwrite an internal command, I believe it was \ and .
Posted By: Armada Re: Alias "alias" - 07/09/04 06:11 AM
"." is a fullstop it just stops you from seeing things
Posted By: dr_Eamer Re: Alias "alias" - 07/09/04 10:43 AM
I didn't mean that.
An aliased command always overrides the mIRC built-in command EXCEPT IF you use the ! command prefix.

eg.
alias linesep { echo This is the alias! }

/linesep will echo "This is the alias!"
/!linesep will echo the line separator!

So what I meant to say was that aliases override mIRC commands and that's why we have the '!' command prefix if we want to avoid this. smile
Posted By: tidy_trax Re: Alias "alias" - 07/09/04 04:26 PM
You're thinking of identifiers, which works backwards to commands:

alias time { return the time is $time }

//echo -a $time
//echo -a $.time
//echo -a $/time
© mIRC Discussion Forums