Visual IRC

Last updated

Visual IRC
Developer(s) Adrian Cable and Tara McGrew
Stable release 2.0pl2 (December 30, 2007;16 years ago (2007-12-30)) [±] [1]
Operating system Windows
License GPL
Website visualirc.net

Visual IRC (ViRC) is an open-source Internet Relay Chat client for the Windows operating system. Unlike many other IRC clients, nearly all of the functionality in ViRC is driven by the included IRC script, with the result that the program's behavior can be extended or changed without altering the source code.

Contents

History

Development of the second incarnation slowed and by 2000 Visual IRC appeared to be dead. The original author MeGALiTH (Adrian Cable) passed the source code to a user, Mr2001 (Tara McGrew), who had previously contributed some code, and who had secretly been developing a clone called Bisual IRC (BIRC). Rather than restarting development of the ViRC '98 code base, he merged some of ViRC '98's features into BIRC and released it as Visual IRC 2.

Much of the source code to BIRC, ViRC 2, and the related utilities has been released under the GPL through the project's web site and SourceForge.

Versus

Versus is a scripting language originally developed for the IRC client Bisual IRC, and currently used with Visual IRC. It is similar in many ways to the scripting languages used by ircII and mIRC, as well as Tcl and C.

The name "Versus" was chosen because it could be shortened to "VS", which was a common abbreviation for ViRCScript, the language used by Visual IRC '96 through '98. Versus remained mostly backward compatible with ViRCScript, so existing documentation and commentary that mentioned "VS" remained mostly accurate when applied to Versus. The name also alluded to BIRC's origins as a replacement for ViRC.

Object Versus, or OVS, refers to the object-oriented features of Versus. Scripts can define classes and work with objects and methods instead of textual data and aliases; however, in practice, OVS is mostly used to manipulate the VCL objects that make up ViRC's interface.

Script storage

Scripts are stored in files, usually with a .vsc file extension, though the .lib extension is sometimes used. A Versus script file simply contains statements to be interpreted when the script is loaded; any blocks defined in a script (see below) will replace blocks defined with the same name by previous scripts.

Blocks that can be defined in a script

Aliases, methods (including constructors and destructors), events, menu items, and toolbar items are referred to as routines or code blocks.

Data storage

Files

  • Scripts can access files with the functions $RandomRead() and $ReadLine(), and the commands CreateFile and AppendText.
  • Scripts can also use the TStringList VCL class to read an entire text file into memory, manipulate it, and save it.

Variables

  • All variables may contain up to 4 GiB of data.
  • Variable names begin with a dollar sign ($) and an uppercase letter, lowercase letter, or underscore.
  • Variables may contain any characters, although they are usually used for printable text.
  • Local variables are set with the @L command and only exist in the context of the routine that created them. They are deleted when the routine ends. Some local variables are predefined, such as $C for the current channel's name.
  • Global variables are set with the @ command and can be accessed from any routine. They are deleted when the client exits. Aliases may return a value by setting the global variable $fresult.
  • Stored variables are set with the @S command and, like global variables, can be accessed anywhere. Their values are saved to persistent storage immediately, and restored the next time the client starts.

Associative arrays

  • Associative arrays map keys to values.
  • Keys and values can contain up to 4 GiB of data with no limits on the allowed characters.
  • Local, global, and stored array values can be set using the @L, @, and @S commands, and they behave just like the corresponding variables. When a stored array value is set, the entire array is saved.
  • The syntax $arrayname[key] is used to set or retrieve the value for a particular key.
  • The syntax $arrayname alone treats an array as a list of key-value pairs, allowing a script to set the entire contents of an array at once, or iterate through the keys that are already present.

Pseudovariables

  • Pseudovariables (or pvars) are similar in syntax to variables, but their values cannot be changed.
  • The pvars $0 through $9 contain the parameters that were passed to the current routine, in order. $0 contains the routine's name, $1 contains the first word of the parameter string, and so on.
  • The pvars $0- through $9- contain the parameters that were passed to the current routine, plus all following parameters. $0- contains the routine's name and the entire parameter string, $1- contains all parameters, $2- contains all parameters after the first, and so on.
  • The special sequence $?="PROMPT STRING" causes a dialog box to appear, prompting the user to enter a value.

Code examples

Here is the Hello World code example:

Alias HELLO   TextOut > $C clBlack Hello, world! EndAlias

Here is an example to count to ten:

Alias TEN   for (@l $i = 1; $i <= 10; $i++)     TextOut > $C clBlack $i   endfor EndAlias

Here is an example to make everyone in the current channel an operator:

Alias MASSOP   foreach ($a,$b,$c,$d; $nicklist($C))     Mode $C +oooo $a $b $c $d   endforeach EndAlias

Related Research Articles

Eiffel is an object-oriented programming language designed by Bertrand Meyer and Eiffel Software. Meyer conceived the language in 1985 with the goal of increasing the reliability of commercial software development; the first version becoming available in 1986. In 2005, Eiffel became an ISO-standardized language.

VBScript is a deprecated Active Scripting language developed by Microsoft that is modeled on Visual Basic. It allows Microsoft Windows system administrators to generate powerful tools for managing computers without error handling and with subroutines and other advanced programming constructs. It can give the user complete control over many aspects of their computing environment.

HyperTalk is a discontinued high-level, procedural programming language created in 1987 by Dan Winkler and used in conjunction with Apple Computer's HyperCard hypermedia program by Bill Atkinson. Because the main target audience of HyperTalk was beginning programmers, HyperTalk programmers were usually called "authors" and the process of writing programs was known as "scripting". HyperTalk scripts resembled written English and used a logical structure similar to that of the Pascal programming language.

AppleScript is a scripting language created by Apple Inc. that facilitates automated control over scriptable Mac applications. First introduced in System 7, it is currently included in all versions of macOS as part of a package of system automation tools. The term "AppleScript" may refer to the language itself, to an individual script written in the language, or, informally, to the macOS Open Scripting Architecture that underlies the language.

In object-oriented programming, the command pattern is a behavioral design pattern in which an object is used to encapsulate all information needed to perform an action or trigger an event at a later time. This information includes the method name, the object that owns the method and values for the method parameters.

mIRC scripting language Scripting language embedded in mIRC

The mIRC scripting language is the scripting language embedded in mIRC and Adiirc, IRC clients for Windows but work with WiNE for Linux.

An environment variable is a user-definable value that can affect the way running processes will behave on a computer. Environment variables are part of the environment in which a process runs. For example, a running process can query the value of the TEMP environment variable to discover a suitable location to store temporary files, or the HOME or USERPROFILE variable to find the directory structure owned by the user running the process.

The Control Language (CL) is a scripting language originally created by IBM for the System/38 Control Program Facility and later used in OS/400. It bears a resemblance to the IBM Job Control Language and consists of a set of command objects (*CMD) used to invoke traditional programs or get help on what those programs do. CL can also be used to create CL programs where there are additional commands that provide program-like functionality

In some programming languages, eval, short for the English evaluate, is a function which evaluates a string as though it were an expression in the language, and returns a result; in others, it executes multiple lines of code as though they had been included instead of the line including the eval. The input to eval is not necessarily a string; it may be structured representation of code, such as an abstract syntax tree, or of special type such as code. The analog for a statement is exec, which executes a string as if it were a statement; in some languages, such as Python, both are present, while in other languages only one of either eval or exec is.

<span class="mw-page-title-main">Graphical widget</span> Element of interaction in a graphical user interface

A graphical widget in a graphical user interface is an element of interaction, such as a button or a scroll bar. Controls are software components that a computer user interacts with through direct manipulation to read or edit information about an application. User interface libraries such as Windows Presentation Foundation, Qt, GTK, and Cocoa, contain a collection of controls and the logic to render these.

<span class="mw-page-title-main">IRC script</span> Way of shortening commands while connected to an IRC network

IRC scripts are a way of shortening commands and responding automatically to certain events while connected to an IRC network. There are many different scripting languages for different types of IRC clients: ircII, BitchX, HexChat, mIRC, Visual IRC, Bersirc, and others have their own scripting languages, many of which share common features and syntax and therefore are easily portable from one IRC client to another.

In computer programming, a sigil is a symbol affixed to a variable name, showing the variable's datatype or scope, usually a prefix, as in $foo, where $ is the sigil.

<span class="mw-page-title-main">Comparison of command shells</span>

A command shell is a command-line interface to interact with and manipulate a computer's operating system.

thinBasic is a BASIC-like computer programming language interpreter with a central core engine architecture surrounded by many specialized modules. Although originally designed mainly for computer automation, thanks to its modular structure it can be used for wide range of tasks.

<span class="mw-page-title-main">Features of the Opera web browser</span> List of software application features

This article details features of the Opera web browser.

TypeScript is a free and open-source high-level programming language developed by Microsoft that adds static typing with optional type annotations to JavaScript. It is designed for the development of large applications and transpiles to JavaScript. Because TypeScript is a superset of JavaScript, all JavaScript programs are syntactically valid TypeScript, but they can fail to type-check for safety reasons.

<span class="mw-page-title-main">PowerShell</span> Cross-platform command-line interface and scripting language for system and network administration

PowerShell is a task automation and configuration management program from Microsoft, consisting of a command-line shell and the associated scripting language. Initially a Windows component only, known as Windows PowerShell, it was made open-source and cross-platform on August 18, 2016, with the introduction of PowerShell Core. The former is built on the .NET Framework, the latter on .NET.

<span class="mw-page-title-main">Silverfrost FTN95</span>

Silverfrost FTN95: Fortran for Windows is a compiler for the Fortran programming language for computers running Microsoft Windows. It generates executable programs from human-written source code for native IA-32 Win32, x86-64 and for Microsoft's .NET platform. There is a free-of-charge Personal edition, which generates programs which briefly display a banner, and Commercial and Academic editions.

<span class="mw-page-title-main">Rexx</span> Command/scripting/programming language

Rexx is a programming language that can be interpreted or compiled. It was developed at IBM by Mike Cowlishaw. It is a structured, high-level programming language designed for ease of learning and reading. Proprietary and open source Rexx interpreters exist for a wide range of computing platforms; compilers exist for IBM mainframe computers.

<span class="mw-page-title-main">Command-line interface</span> Computer interface that uses text

A command-line interface (CLI) is a means of interacting with a computer program by inputting lines of text called command-lines. Command-line interfaces emerged in the mid-1960s, on computer terminals, as an interactive and more user-friendly alternative to the non-interactive interface available with punched cards.

References

Further reading