cclogo2.gif (32918 bytes)

Aliases

Welcome to installment two of Popups/Aliases/Remotes. Here I shall try to shed some light on aliases. Most of you will find this very easy to understand as it is almost a mirror image of popups.

The basic difference between popups and aliases is that an alias is activated by typing in an 'alias' name rather than selecting a name from a 'popup' menu. The basic syntax is the same with a couple of small exceptions. A popup just has a simple name assigned to it. This can be done because a popup name never need be typed in a window, and therefore, should never be mistaken by the mIRC operating system as text to be sent or as a command to be processed. An Alias, on the other hand, gets typed right in the channel or query box, and must be identified as a command to be processed and not text to be sent to the channel.

In an alias, what we are doing is making another 'command', so to speak. If you remember, the command prefix is a '/' for all mIRC commands. When we make an alias, we are taking existing commands, adding whatever parameters we want to them, and making up a whole new name (alias) for the whole thing!
We accomplish this by 'defining' the alias in the mIRC editor. The alias editor can be brought up by pressing the 7th button from the left on the mIRC button bar.

Pretty much any mIRC or IRC command can be made into an alias. Keep in mind however that you would need a reason to make the command into an alias. The idea is not to repeat an already existing command, but to make that command easier to use.

Lets take a look at the structure of an alias, using a relatively useful alias as an example.
 

  • The first part of the alias would be the command prefix, in mIRC's case a '/'
  • The second part is a space. This separates the alias name from the command.
  • The third is the command and any parameters.

Example:

/ID /msg nickserv identify <password>

You may want to add this to your aliases after changing the <password> to your actual IRC Nickserv password. Then, if there is a nickserv identify request sent to you, you can identify yourself by typing "/id" instead of the whole IRC command line.

In this example:

The '/ID' is the name of the alias. This is what you would type in when you want to execute or 'RUN' the alias.
The " " separates the name from the command and parameters
The '/msg' is the IRC command.
The 'nickserv <password> are the parameters of the '/msg' command.

Here are some more examples:
/ms /msg memoserv send $$1 $?="Type in message to send:"
/mc /msg chanserv $?="Enter the CHANSERV command"
/o /onotice # $?="Op Notice: "
/s /sound # $?="Enter Sound to Play"
 

As well as the command definition that we just presented, you may also define your F keys to perform any mIRC or IRC commands. This is accomplished by simply using the F key name in place of what would normally be your alias name. Here are a couple of examples:

/F1 /say LOL!
/F2 /say The current date and time is: $fulldate

Again, TJerk has included instructions and all the necessary parameters for building useful aliases.

Happy scripting,
-Track
 
 


Comments or suggestions? Please write:

TechEditor@chatcircuit.com

Email the TechEditor

[ Back To TechPage ]

[ Back To ChaTcIRCuiT ]

 

10x10space.gif (821 bytes)
purple line
IRC Info Tech Area Features Diversions F.Y.I.   About ChaTcIRCuiT Return to ChaTcIRCuiT Home Page
purple line
All Rights Reserved ChaTcIRCuiT  ©1997, 1998, 1999
webmaster@chatcircuit.com