 |
|
Commandline interface
|
|
|
Overview   Commandline syntax 
 Useful definitions
Commandline syntax
KVirc provides a powerful commandline interface.
Features most standard IRC commands plus some other non standard.
The syntax used may seem complex at the first approach , but in fact using it is not harder than
using bash or writing a shell script.
The command line don't stops at the 'simple' command : you can execute more commands in
sequence (pipe :) , use variables , identifiers and conditional expressions.
KVirc treates as a 'command' any sequence of characters that you type in
the commandline box of a 'child' window, and that starts with a '/'.
Everything else is treated in the following way:
- All the 'non-commands' typed in the status cosole window are sent to
the current server,exactly as they are...(In RAW format)
- All the 'non-commands' typed in a channel window are sent to
the server as 'privmsg #channel 'non-command' (talk to channel)
- All the 'non-commands' typed in a query window are sent to
the server as 'privmsg ' (talk to the query)
- All the 'non-commands' typed in a chat window are sent through
the corresponding DCC connection (if any)
- All the 'non-commands' typed in a user created window are handled by
the Event_OnUserWndInput event
General command syntax:
KVirc uses an extended commandline syntax, that allows you to execute more commands in sequence (pipe).
- A sequence of commands MUST start with a '/' (as described above)
- The commands are separated by a ';'
- The last command may not contain the trailing ';'
- The commands are NOT case sensitive
Here are some examples of simple valid commandlines:
/JOIN #channel
/JOIN #channel;
/jOiN #channel;PART #channel
/join #channel,#channel2,#channel3;SAY #channel2 What's on?;PART #channel3
- The commands can be grouped by block separators ('<' and '>'),
and the closing block separator must be followed by a ';' as a normal command.
/JOIN #channel;< Part #channel; >
/< join &errors;PART &servers; > ;JOIN &debug
Useful grammar definitions
This topic describes some parts of the grammar used by KVIrc+
You will find it useful when reading syntax of commands.
---General rules---
The grammar productions are described using the following syntax:
< left-part > ::= 'right-part' | 'alternative' | ...
the one above means that the non-terminal symbol < left-part >
is replaced by 'right-part' (that can be terminal or not...) or by the 'alternative'.
< left-part > ::= c[ x ] | d( a | b )
the one above means that < left-part > can be replaced by 'c' that CAN be followed by a 'x' ,
or by a 'd' that MUST be followed by a 'a' or a 'b'.
---@@@---
< string > ::= any non empty sequence of characters without spaces
< channel > ::= ( # | & ) < string >
< nick > ::= < string >
< channel-list > ::= < channel > [,< channel-list > ]
< nick-list > ::= < nick > [,< nick > ]
< variable > ::= $< string >
< sys-variable > ::= $_< string >
< sys_identifier > ::= $%< prefix >_< string >
---@@@---
Note that int the channel-list and the nick-list there are NO spaces between list elements!.
The same rules applies to < window-list >,< target-list > and so on...
Index