From WikiChip
Editing mirc/aliases

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

This page supports semantic in-text annotations (e.g. "[[Is specified as::World Heritage Site]]") to build structured and queryable content provided by Semantic MediaWiki. For a comprehensive description on how to use annotations or the #ask parser function, please have a look at the getting started, in-text annotation, or inline queries help pages.

Latest revision Your text
Line 348: Line 348:
 
The order used by mIRC to locate your alias is as follow:
 
The order used by mIRC to locate your alias is as follow:
  
* files are read from top to bottom and only the first found alias in file will be used
+
* If the name exists as a built-in $identifier, your alias cannot be called as an identifier unless you use the . or / prefixes as described above. If the name exists as a built-in /command, it cannot execute your alias if the ! command prefix is used as describe above.
* if the call is made from a script and there is an alias for that name in the script file, that alias is used (regardless if the alias is local or not)
+
* if the call is made from a script and there is a local alias for that name in the script file, that alias is used
* if none of the above is true, then the order in which you loaded the script is used. mIRC looks for the first non local alias in the order 1-or-more aliases files in the Alt+D tab of the script editor, followed by the scripts of the Alt+R tab in the order they're loaded. If you have the same alias name defined twice in the same file, the 2nd one cannot be executed.  
+
* otherwise, if the call is made from a script and there is a non local alias for that name in the same script file, that alias is used (see the note)
 +
* if none of the above is true, then the order in which you loaded the script is used. mIRC looks for the first non local alias in the order 1-or-more aliases files in the Alt+D tab of the script editor, followed by the scripts of the Alt+R tab in the order they're loaded. If you have the same non-local alias name defined twice in the same file, the 2nd one cannot be executed. If you have the same non-local alias defined in 2 different script files, it's possible to change that order from the script editor's menu (file/order).
 
* If none is found, then mIRC check if this is a built-in command name
 
* If none is found, then mIRC check if this is a built-in command name
* If still no match and if it was a command call, then it sends the command to the server , which sends back RAW numeric 421 if it's an invalid server command
+
* If still no match, then it sends the command to the server, which sends back RAW numeric 421 if it's an invalid server command
  
'''Note:''': The command line of a timer behaves as if it's inside the script from where it was launched, it will execute aliases found in the file first.
+
'''Note:''': The command line of a timer behaves as if it's inside the script from where it was launched. It can execute local aliases within that script, and give preference to non-local aliases located in that same script. The alias on a higher scriptline is executed regardless whether the top or bottom alias is -l local.
 +
 
 +
[maroon edit: this next paragraph doesn't make sense to me, but i want other opinions before i change it]
 +
'''Note''': This means that local aliases only guarantees no other script file can call the alias, they does not help making sure that alias is called if a code in the same script file calls your alias: a non local alias also guarantees the alias is called if it's in the same script file, the order in which you loaded the script won't matter.  
  
 
== See also ==
 
== See also ==

Please note that all contributions to WikiChip may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see WikiChip:Copyrights for details). Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)