Internet Relay Chat - Everything you need to know about IRC, chatting online, mIRC, PIRCH, #Beginner Newsletters, being an Op (@) or Voice (+V), meeting others worldwide -- it's fun!

#Beginner Homepage - Undernet - Internet Relay ChatMascot - Team Geese
  | Home  | Gallery  | IRC Info  | Op/Voice Info  | Just for Fun  | Sitemap  | Guestbook  | Search  |Forum  |
#B Home

Gallery

IRC Info
       IRC Class
       mIRC
         . Aliases
         . Commands
         . Popups
         . Remotes
       PIRCH
         . PIRCH Pils
       Abbreviations
       Channel List
       Colors
       DCC Trouble
       Emoticons
       Etiquette
       FAQ's
       History of IRC
       Help Files
       IRC Class
       IRC Clients
       IRC Glossary
       IRC Tips
       IRC Commands
       IRC URL's
       Keyboard Tips
       Need Help?
       Quit Messages
       Scripts
       Security
       Server Info
       Sounds
       Trojans
       Tutorials
       Undernet
         . U-net History
       User Modes
       Useful URL's
       Virus Alerts *
       Viruses
       Worms
       Web Glossary

Op/+V Info

Just For Fun

Visitor Stats

Sitemap

Guestbook

Send Mail


SEARCH


 

 

 

 

 

 

 

 

 

 
IRC Information.....

Aliases - What They Are and How to Make Them

Note: This help file was written with mIRC in mind, but much of the information relates to PIRCH users as well. We hope to have a specific PIRCH tutorial available soon.

I. Introduction

Aliases and popups are used to store text, commands, and other keystrokes to be used over and over. Remotes are used to store text, commands, and other keystrokes that can be executed automatically on the ocurrence of some event or text.

Aliases, popups, and remotes (and more advanced scripts) are extremely useful tools for op's and v's. Op's and v's use these tools to teach, warn, kick, and ban users in the channel.

Individual op's and v's tend to favor aliases over popups, or vice versa. Some people are just more keyboard-oriented, or more mouse-oriented.

Most people think learning to use all of these irc tools is simplest when starting with the alias, however. Also, all op's and v's should know the basics of all the tools in order to help beginners in the channel.

Thus this help file will give you the basics of aliases. The ideas here can be expanded upon when learning popups, remotes, and more advanced scripts. After you are comfortable with the basics of all the tools, you can decide which you prefer and build up your files accordingly.

II. The Basics

Aliases are a shortcut way to execute a predefined command over and over. Aliases are executed with the keyboard. (One of the major differences between aliases, popups, and remotes is how they are executed. Aliases are executed with the keyboard; popups are executed with the mouse, and remotes are executed automatically, without any effort by the op or v.)

When writing an alias, you also designate the keyword shortcut that is used to execute it. These aliases are stored in the alias.ini file by default. You can load more alias files if you want.

The basic form of the alias is:
     /shortcut /command and text you want said

As an example, I have an alias that I play whenever anyone asks where i am from. It looks like the following:
     /from /me is from Minnesota, USA.

To execute this alias, I simply type /from

The alias executes the /me command (action) and all users will see the following in the channel.
      * krae is from Minnesota, USA.

III. Parameters

Often, you will want to include some user's nick in the text your alias plays. That is one use for parameters. For example, if you look in your alias file by pressing [alt][a] or clicking on Tools/Aliases, or the aliases button on the toolbar, you will see the following alias (or something very close to it).
     /w /whois $$1

This alias performs a /whois on a specified nick. The /w is the shortcut part of the alias. The $$1 is the parameter part of the alias. This alias is executed by typing /w some_nick

The parameter part needs a little explanation. There are many different types of parameters. All paramaters in aliases start with a $. If there is only one $, the parameter is OPTIONAL. If there are two $, such as in the example above, the parameter is REQUIRED, meaning the alias will not run if the parameter is not specified. To illustrate, consider the following alias:
     /eng /say $1 please speak English in #beginner. Thank you.

Notice the $1 paramter has only one $. This parameter is optional. If I type /eng Carlos, the channel will see:
     <krae> Carlos please speak English in #beginner. Thank you.

If on the other hand, I type /eng, the channel would just see:
     <krae> please speak English in #beginner. Thank you.

If the parameter had been $$1 instead of $1, the plain /eng would not have worked at all. Nothing would have been shown in the channel because a required parameter was not specified.

The 1 part of the $1 or $$1 means the 'first word typed after the shortcut.' If I had typed /eng Carlos and Juan the alias would have ignored the 'and Juan' part because it was only looking for the FIRST word after the shortcut, which in this case is /eng.

You can make the alias look for more than just the first word, however. Consider the following:
     /huggles /me huggles $$1 $2 $3

In this case, only the first parameter is required, but also a second and third word would be recognized if they are there. If I type /huggles Carlos the channel would see
     * krae huggles Carolos

If I type /huggles Carlos and Juan the channel would see
     * krae huggles Carlos and Juan

If I type /huggles Carlos and Juan and Juanita the channel would see
     * krae huggles Carlos and Juan

Remember, I had only specified up to three words, so the and Juanita part is ignored. What if I wanted to be able to huggle as many people as I wanted, or to specify a reason for the huggle? If I include a - (hyphen) after the variable, it will reconize the specifed parameter AND all words after it. For example, a slight change to the previous alias:
     /huggles /me huggles $$1 $2-

There the first parameter is required, the second is optional, but the second parameter is not just the second word, but all words starting with the second word. Thus, if I type /huggles Carlos the channel would see
     * krae huggles Carolos

If I type /huggles Carlos and Juan the channel would see
     * krae huggles Carlos and Juan

If I type /huggles Carlos and Juan and Juanita the channel would see
     * krae huggles Carlos and Juan and Junita

If I type /huggles Carlos cuz he's so handsome the channel would see
     * krae huggles Carlos cuz he's so handsome

IV. Identifiers

So far, we've talked about paramters that must be specified as you execute the alias. There are numerous other parameters that mIRC can figure out itself. These parameters that mIRC can compute itself are called identifiers. For example:
     /timeme /say It is now $time at $me's place.

If I type /timeme, mIRC will display the following in the channel
     <krae> It is now 17:38:23 at krae's place.

The above is just an example. The $time identifier will read my computer's clock and return the current time, and the $me will return my current nick, whatever it happens to be at the time.

Another commonly used identifier is the #, which specifies your current channel.

You can find a list of identifiers in mIRC's help file or in mIRC's FAQ.

V. Colors

You can add colors and text features such as bold and underline to aliases the same way you add colors to commands you execute. As you are typing the alias in the alias editor, or after you've created the alias and made sure it works properly, just go and and press the appropriate keystroke combinations where you want the color or text feature to start and stop. Your keystrokes will appear as a black box in the alias.

For a tutorial on using colors, visit here.

VI. Multiple Commands

If you want multiple comands to be run by an alias, use the | (pipe) character to separate them. (The | is usually the shift of your blackslash (\) key. On most keyboards it looks like two short vertical lines on top of each other instead of one vertical line.)

For example:
     /actions /me says $1 to perform actions, type '/me message' Here's an example: | /me says hi!

If i typed /actions Juan, the channel would see:
     * krae says Juan to perform actions, type /me message Here's an example:
     * krae says hi!

Since I used $1 instead of $$1, this alias would work without a nick too. If I type /actions the channel would see:
     * krae says to perform actions, type /me message Here's an example:
     * krae says hi!

VII. Comments

After you write or obtain a number of aliases, you may want to organize them in to categories. If you precede a line in your alias file with a ; (semi-colon), it will act as a comment and will not be executed. For example, you may want separate sections for teaching and kicks & bans. You will learn the syntax of the kicks and bans later. For now just look at the use of the semi-colons for comments. Personally, I tend to keep my aliases in alphabetical order by keyword in each section. That just helps me stay organized. You can organize your aliases any way you want.

;---Teaching aliases---
/actions /me says $1 to perform actions, type '/me message' Here's an example: | /me says hi!
/bold /say $1 to make text bold, press [ctrl][b] before you type it.

;---Kicks and bans---
/kb /ban # $$1 3 | /kick # $$1 $2- | /notice $$1 You were banned because: $2-
/kghost /kick # $$1 Bye bye ghostie
/knick /kick # $$1 Change the nick before you come back please

VIII. More Information

Once you know the basics of aliases; popups, remotes, and scripts are easier to learn. The mIRC help files have more information. Our #learnin classes are great places to learn about these tools. Ops are usually more than happy to share aliases, popups, remotes, and scripts they've written, so just ask. We're here to help.

I mean that in many ways. :) The ops are here to help the v's, and the op's and v's are here to help each other; but even more fundamentally, the op's and v's are here (in #beginner) to help the users. It's always useful to keep that in mind.

Have fun creating your aliases! Krae :)

 


Site last updated: Monday, September 02, 2013
line
  Webdesign & development by IRC Beginner.com
  All rights reserved © 1998-2005