mIRC Home    About    Download    Register    News    Help

Print Thread
max. same aliases #218569 18/02/10 04:55 AM
Joined: Jul 2008
Posts: 51
R
RiMaJoy Offline OP
Babel fish
OP Offline
Babel fish
R
Joined: Jul 2008
Posts: 51
hi,

Is there a max on the same aliases in mirc?
I have add a language script to my mirc and all my addon have a own language file.
In every script i put an alias that points to the language file but somehow after a few aliases it stopped working.
If i change the alias sign it works again.

All scripts have this:
Code:
alias _ { return $read($langdir $+ te.lng,s,$1) }


Ofcourse the filename is different in every script.

Greetsss,
RiMaJoy

Re: max. same aliases [Re: RiMaJoy] #218570 18/02/10 05:59 AM
Joined: Oct 2005
Posts: 1,741
G
genius_at_work Offline
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
If you want each alias to be local to the script file that it is in, you can use the -l (lowercase L) switch when declaring the alias. Example:

alias -l _ { return ... }

The above alias would only be accessible from within its script file. Each script can then have its own _ alias without interfering with the _ aliases in other script files.

-genius_at_work

Re: max. same aliases [Re: genius_at_work] #218578 18/02/10 10:50 PM
Joined: Jan 2007
Posts: 1,156
D
DJ_Sol Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
Otherwise you have to rename them. mIRC will use the first alias it finds starting in the alias section then moving through your file list starting at file 1.

So in your case mirc was executing the first matching alias it found.

Re: max. same aliases [Re: DJ_Sol] #218631 20/02/10 09:23 PM
Joined: Jul 2008
Posts: 51
R
RiMaJoy Offline OP
Babel fish
OP Offline
Babel fish
R
Joined: Jul 2008
Posts: 51
-l does the job.

after loaded a few addons mirc was trying to use 2 or perhaps more addons at once.
That is why i had no text because mirc was using the alias already.
Renaming them would mean going by all scripts and find all commands and rename them as well.
Lots and lots of work.

Poblem is fixed thanks for helping

Re: max. same aliases [Re: RiMaJoy] #218634 20/02/10 10:17 PM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
That's why it's a good idea to name aliases (and variables) with unique names that are unlikely to be used by any other scripts.


Invision Support
#Invision on irc.irchighway.net