mIRC Home    About    Download    Register    News    Help

Print Thread
Aliases. #36080 13/07/03 03:57 AM
Joined: Mar 2003
Posts: 272
C
c0ldfusi0n Offline OP
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Mar 2003
Posts: 272
There's three way to list an alias:

1) $isalias(name).alias
2) Using $read and $isalias(name).fname
3) Opening the editor.

$isalias(name).alias only returns the first line of an alias, that's something you probably all know. Exemple:
Code:
/blah {
  if (%blah) { return $true }
  else { return $false }
}

Now if we try to //echo $isalias(blah).alias, this is what we will get:
{
Since it only reads the first line.
I think that making $isalias(name).alias return the whole alias would be quite useful.


- cF
Dedicated helper for rent.
Re: Aliases. #36081 13/07/03 08:32 AM
Joined: Feb 2003
Posts: 2,690
Raccoon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,690
Not if that alias is over 950 characters.

Perhaps if there was a second parameter for life number.
$isalias(name,N).alias

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Re: Aliases. #36082 13/07/03 03:20 PM
Joined: Dec 2002
Posts: 127
F
feud Offline
Vogon poet
Offline
Vogon poet
F
Joined: Dec 2002
Posts: 127
this snippet from ms.org echos your code.. with a few modifications, it could work for your needs.

link


------
deep down, i'm really superficial.
Re: Aliases. #36083 13/07/03 03:39 PM
Joined: Dec 2002
Posts: 2,809
C
codemastr Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
That script doesn't work correctly for aliases contained in the aliases.ini:

Found op on line in aliases.ini.
/mode # +ooo $$1 $2 $3

Note how it doesn't show the line number there, and if you try and use a multi-line alias in aliases.ini:

Found testalias on line in aliases.ini.
{

So it suffers from similar problems to $isalias.

Re: Aliases. #36084 13/07/03 03:56 PM
Joined: Mar 2003
Posts: 272
C
c0ldfusi0n Offline OP
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Mar 2003
Posts: 272
Yeah, i saw that code -- it only works for aliases contained in remotes, as codemastr said.

$isalias(name,N).alias would be good i guess, it could easily be looped through.


- cF
Dedicated helper for rent.
Re: Aliases. #36085 13/07/03 09:19 PM
Joined: May 2003
Posts: 2
D
Deamer Offline
Bowl of petunias
Offline
Bowl of petunias
D
Joined: May 2003
Posts: 2

I'm working on adding support for non-remote aliases and local aliases. I'll post it on ms.org when i'm done.

I agree with your suggestion tough, i think it'd be better if this were to be added.