mIRC Home    About    Download    Register    News    Help

Print Thread
#96867 06/09/04 01:05 PM
Joined: Jan 2003
Posts: 53
Z
Zonk Offline OP
Babel fish
OP Offline
Babel fish
Z
Joined: Jan 2003
Posts: 53
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]

#96868 06/09/04 02:43 PM
Joined: Mar 2004
Posts: 540
A
Fjord artisan
Offline
Fjord artisan
A
Joined: Mar 2004
Posts: 540
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

#96869 06/09/04 05:21 PM
Joined: Aug 2004
Posts: 101
D
Vogon poet
Offline
Vogon poet
D
Joined: Aug 2004
Posts: 101
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.

Last edited by dr_Eamer; 06/09/04 05:22 PM.

Maybe I wake up one day to notice that all my life was just a dream!
#96870 07/09/04 06:07 AM
Joined: Mar 2003
Posts: 50
C
Babel fish
Offline
Babel fish
C
Joined: Mar 2003
Posts: 50
I don't think '!' is what tells mIRC to overwrite an internal command, I believe it was \ and .

#96871 07/09/04 06:11 AM
Joined: Mar 2004
Posts: 540
A
Fjord artisan
Offline
Fjord artisan
A
Joined: Mar 2004
Posts: 540
"." is a fullstop it just stops you from seeing things

#96872 07/09/04 10:43 AM
Joined: Aug 2004
Posts: 101
D
Vogon poet
Offline
Vogon poet
D
Joined: Aug 2004
Posts: 101
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

Last edited by dr_Eamer; 07/09/04 10:47 AM.

Maybe I wake up one day to notice that all my life was just a dream!
#96873 07/09/04 04:26 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
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


New username: hixxy

Link Copied to Clipboard