mIRC Home    About    Download    Register    News    Help

Print Thread
#15569 15/03/03 11:51 PM
Joined: Dec 2002
Posts: 266
Z
zack Offline OP
Fjord artisan
OP Offline
Fjord artisan
Z
Joined: Dec 2002
Posts: 266
$isalias(...).type to return whether it's a local or global alias (alias -l for local *I am assuming that is what -l means heh*).

-Edit-

And yes $isalias(bob) does return $false if it is local, but that also returns when the alias doesn't exist.


You won't like it when I get angry.
Joined: Mar 2003
Posts: 54
J
Babel fish
Offline
Babel fish
J
Joined: Mar 2003
Posts: 54
Good idea, but it would cause some conflict.
Let's say the first script loaded was hi.mrc, and the second script loaded was blah.mrc. They could both have the alias "blah" in them. Pretend blah.mrc has /blah as local, and hi.mrc has /blah as global. /blah called from the command line would refer to hi.mrc's /blah command. /blah called from within hi.mrc would refer to hi.mrc's local /blah command.

What would the identifier return then? confused

Joined: Dec 2002
Posts: 266
Z
zack Offline OP
Fjord artisan
OP Offline
Fjord artisan
Z
Joined: Dec 2002
Posts: 266
You could maybe implement $isalias(name,N) where:

$isalias(name,0) - returns how many
$isalias(name,1) - if alias exists, return $true
$isalias(name,1).type - if alias exists, return it's type.

And of course $isalias(name) will default as $isalias(name,1)


You won't like it when I get angry.

Link Copied to Clipboard