IRC Commands    Command Reference    Basic Commands     Intermediate Commands    Advanced Commands
Download
Features
Screenshots
Version History
Registration
Contact



Snak Manual

Introduction
Quickstart
Connecting to a server
Joining channels
Sending messages
Actions
Keeping track of people
Customization and settings
Using DCC
IRC commands
Scripting
Troubleshooting

 

Command Reference

Snak comes with many built in commands – way too many to describe here, and on top of that are all the aliases (user defined commands that extend or replace the built in ones).

The Command Reference list provides a convenient location where you can browse all the available commands and learn what they do. In addition to commands and aliases it can also be useful to know what variables that the various scripts and aliases define, and what built in functions are available.

When you write scripts you can take advantage of built in functions. Built in functions are not commands because you can't call functions directly from the command line. They can only be called from within a script (which you can then call from the command line). The full list of functions is displayed if you select Functions in the second popup in the command reference window.

In this example you can see some of the many commands that are available to you. You will notice two different kinds of descriptions in the list. The first, exemplified by SIGNOFF – Synonym for /QUIT is that of a built in command. The built in commands have a short syntax description or help text in the description column. The second is exemplified by SING which is an alias. An alias is a user defined command made up of a snippet of script code. For an alias, the command reference will display the script code that the alias stands for.

You can learn all about scripting in the scripting chapters, but I'll briefly explain the snippet of script code for the SING alias since I brought it up. The Command Reference displays the alias on a single line of code but it's easier to understand the structure by writing it on multiple lines.

alias sing {
    if ([$*])
	{ me sings $*} 
	{ me sings "O sole mio, sta'n fronte a te..."}
}

The "if" statement consists of a test statement and one or two blocks of code. A block is everything that is between a { and a }. If the test statement is true then the first block is executed, and if not then the second block is run.

In this case the test statement checks if you have provided a parameter to the alias. That means if you have typed "/sing a lullaby", then "a lullaby" is the parameter being passed in. The parameter will used for part of the output and you'll see "/me sings a lullaby". If you did not provide a parameter the output will be the generic "/me sings O sole mio..". The cryptic $* stands for all the words in the parameter.

Each profile in Snak has its own collection of commands and variables and connections can’t reference each others contents. Therefore there is a popup menu in the command reference window to switch between the various profiles.

The scripts are stored in the Scripts folder in the Application Support folder, which is found in your Library folder. Each profile looks in the Scripts folder and automatically loads the contents of the script files action and basical when it's created, so the connections will have a common subset of commands.

If you were to for example load the PurePak script package into one connection but not another, then you would see a large number of additional aliases for that connection. The command to load a script into a connection is /load. The command /load purepak.irc will thus load the PurePak package.

 

Snak is Copyright © 1997-2006 Kent Sorensen. All Rights Reserved.
Logo design by energetics-design.