Visual IRC
   HOME

TheInfoList



OR:

Visual IRC (ViRC) is an
open-source Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use and view the source code, design documents, or content of the product. The open source model is a decentrali ...
Internet Relay Chat IRC (Internet Relay Chat) is a text-based chat system for instant messaging. IRC is designed for Many-to-many, group communication in discussion forums, called ''#Channels, channels'', but also allows one-on-one communication via instant mess ...
client for the
Windows Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
operating system. Unlike many other
IRC client IRC (Internet Relay Chat) is a text-based chat system for instant messaging. IRC is designed for Many-to-many, group communication in discussion forums, called ''#Channels, channels'', but also allows one-on-one communication via instant mess ...
s, 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 In computing, source code, or simply code or source, is a plain text computer program written in a programming language. A programmer writes the human readable source code to control the behavior of a computer. Since a computer, at base, only ...
.


History

*Visual IRC (16-bit) – Released in 1995 for Windows 3.x, written by MeGALiTH. This
program Program (American English; also Commonwealth English in terms of computer programming and related activities) or programme (Commonwealth English in all other meanings), programmer, or programming may refer to: Business and management * Program m ...
had many built-in features, but it was also scriptable with VPL (
ViRC Programming Language 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 beh ...
), the predecessor to ViRCScript and
Versus Versus (Latin, 'against') may refer to: Film and television * ''Versus'' (2000 film), a Japanese zombie film * ''Versus'' (2016 film), a Russian sports drama film * ''Versus'' (2019 film), a French thriller film * Versus (TV channel), form ...
. *Visual IRC '96 (and later Visual IRC '97, Visual IRC '98) – Released in 1996, written by MeGALiTH. This was the first 32-bit version of ViRC, written for Windows 9x/NT. Many of the features that were built into 16-bit ViRC were handled by the default script in ViRC '96. ViRC '98 contained some code contributed by Tara McGrew AKA "Mr2001", particularly enhancements to the ViRCScript engine. The
scripting language In computing, a script is a relatively short and simple set of instructions that typically automation, automate an otherwise manual process. The act of writing a script is called scripting. A scripting language or script language is a programming ...
was incompatible with the earlier version. In later versions, voice chat and video conferencing features were added. :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. *Visual IRC 2 – First released by Mr2001, coincidentally in 2001, this version's
Versus Versus (Latin, 'against') may refer to: Film and television * ''Versus'' (2000 film), a Japanese zombie film * ''Versus'' (2016 film), a Russian sports drama film * ''Versus'' (2019 film), a French thriller film * Versus (TV channel), form ...
scripting language is based on ViRCScript, but internally it has been almost totally rewritten. In fact, ViRC 2 only shares a few hundred lines of code with ViRC '98. The voice and video conferencing features were removed in this version because the
libraries A library is a collection of Book, books, and possibly other Document, materials and Media (communication), media, that is accessible for use by its members and members of allied institutions. Libraries provide physical (hard copies) or electron ...
used to implement them were no longer supported. Much of the source code to BIRC, ViRC 2, and the related utilities has been released under the
GPL The GNU General Public Licenses (GNU GPL or simply GPL) are a series of widely used free software licenses, or ''copyleft'' licenses, that guarantee end users the freedom to run, study, share, or modify the software. The GPL was the first c ...
through the project's web site and
SourceForge SourceForge is a web service founded by Geoffrey B. Jeffery, Tim Perdue, and Drew Streib in November 1999. SourceForge provides a centralized software discovery platform, including an online platform for managing and hosting open-source soft ...
.


Versus

Versus is a
scripting language In computing, a script is a relatively short and simple set of instructions that typically automation, automate an otherwise manual process. The act of writing a script is called scripting. A scripting language or script language is a programming ...
originally developed for the
IRC client IRC (Internet Relay Chat) is a text-based chat system for instant messaging. IRC is designed for Many-to-many, group communication in discussion forums, called ''#Channels, channels'', but also allows one-on-one communication via instant mess ...
Bisual IRC, and currently used with Visual IRC. It is similar in many ways to the scripting languages used by
ircII ircII (pronounced ''i-r-c-two'' or ''irk-two'', and sometimes referred to as ''IRC client, second edition'') is a Free and open source software, free, open-source Unix Internet Relay Chat, IRC and Internet Citizen's Band, ICB client written in C ...
and
mIRC mIRC is an Internet Relay Chat (IRC) client for Windows with an integrated scripting language allowing the creation of extensions. The software was first released in 1995 and has since been described as "one of the most popular IRC clients avai ...
, as well as
Tcl TCL or Tcl or TCLs may refer to: Business * TCL Technology, a Chinese consumer electronics and appliance company ** TCL Electronics, a subsidiary of TCL Technology * Texas Collegiate League, a collegiate baseball league * Trade Centre Limited ...
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 In telecommunications and computing, backward compatibility (or backwards compatibility) is a property of an operating system, software, real-world product, or technology that allows for interoperability with an older legacy system, or with inpu ...
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 Object-oriented programming (OOP) is a programming paradigm based on the concept of '' objects''. Objects can contain data (called fields, attributes or properties) and have actions they can perform (called procedures or methods and impleme ...
features of Versus. Scripts can define classes and work with objects and methods instead of textual data and
aliases A pseudonym (; ) or alias () is a fictitious name that a person assumes for a particular purpose, which differs from their original or true meaning (orthonym). This also differs from a new name that entirely or legally replaces an individual's ow ...
; 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
file extension File or filing may refer to: Mechanical tools and processes * File (tool), a tool used to remove fine amounts of material from a workpiece. ** Filing (metalworking), a material removal process in manufacturing ** Nail file, a tool used to gen ...
, though the .lib extension is sometimes used. A Versus script file simply contains
statement Statement or statements may refer to: Common uses *Statement (computer science), the smallest standalone element of an imperative programming language *Statement (logic and semantics), declarative sentence that is either true or false *Statement, ...
s 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 are
subroutine In computer programming, a function (also procedure, method, subroutine, routine, or subprogram) is a callable unit of software logic that has a well-defined interface and behavior and can be invoked multiple times. Callable units provide a ...
s. They can be called from the command entry line of any window, or from other parts of the script. Aliases that return a value are called functions; an alias can determine whether it's expected to return a value, and then act as a function or a command appropriately. *Classes are used in object-oriented scripting (OVS). Each class may contain
properties Property is the ownership of land, resources, improvements or other tangible objects, or intellectual property. Property may also refer to: Philosophy and science * Property (philosophy), in philosophy and logic, an abstraction characterizing an ...
,
method Method (, methodos, from μετά/meta "in pursuit or quest of" + ὁδός/hodos "a method, system; a way or manner" of doing, saying, etc.), literally means a pursuit of knowledge, investigation, mode of prosecuting such inquiry, or system. In re ...
s, a constructor, and a destructor. *Events are used to
handle A handle is a part of, or an attachment to, an object that allows it to be grasped and object manipulation, manipulated by hand. The design of each type of handle involves substantial ergonomics, ergonomic issues, even where these are dealt wi ...
messages from the IRC
server Server may refer to: Computing *Server (computing), a computer program or a device that provides requested information for other programs or devices, called clients. Role * Waiting staff, those who work at a restaurant or a bar attending custome ...
, as well as certain system- or client-level occurrences, such as completing a
file transfer File transfer is the transmission of a computer file through a communication channel from one computer system to another. Typically, file transfer is mediated by a communications protocol. In the history of computing, numerous file transfer protoc ...
or opening a new window. **Server events use
regular expression A regular expression (shortened as regex or regexp), sometimes referred to as rational expression, is a sequence of characters that specifies a match pattern in text. Usually such patterns are used by string-searching algorithms for "find" ...
s or Versus's own
wildcard character In software, a wildcard character is a kind of placeholder represented by a single character (computing), character, such as an asterisk (), which can be interpreted as a number of literal characters or an empty string. It is often used in file ...
s to match messages from the server. If multiple server events match a particular message, only the one with the highest priority (calculated from the length of the pattern and the relative "value" of the wildcards therein) will be executed. **Client events are identified by name: for example, <OnCreateWindow_foo> and <OnCreateWindow_bar> will both run when a new window is opened. They can also include patterns, which limit the particular occurrences that can trigger that event (for example, to only run when a new ''channel'' window is created). *Menu trees and menu items define the
context menu A context menu (also called contextual, shortcut, and pop up or pop-up menu) is a menu in a graphical user interface (GUI) that appears upon user interaction, such as a right-click mouse operation. A context menu offers a limited set of choic ...
s that can appear for various elements of the client's interface, as well as the main menu which is always visible. Menu tree blocks define the menu's layout and set captions for each item; menu item blocks define the script code to be executed when an item is clicked. *Toolbars and toolbar items are similar to menu tree and menu item blocks, but they define the
toolbar The toolbar, also called a bar or standard toolbar (originally known as ribbon), is a graphical control element on which on-screen icons can be used. A toolbar often allows for quick access to functions that are commonly used in the program. Some ...
s associated with each window. New toolbars can be added to the interface simply by choosing a unique name. 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 Gib or GIB may refer to: Places * Gibraltar, British overseas territory ** Gibraltar International Airport, IATA code GIB ** Gibraltar national football team, FIFA code GIB * Mount Gibraltar, known as The Gib, New South Wales, Australia * 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 array In computer science, an associative array, key-value store, map, symbol table, or dictionary is an abstract data type that stores a collection of (key, value) pairs, such that each possible key appears at most once in the collection. In math ...
s 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 ey/code> 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 Hello World may refer to: * "Hello, World!" program, a computer program that outputs or displays the message "Hello, World!" Music * "Hello World!" (composition), song by the Iamus computer * "Hello World" (Tremeloes song), 1969 * "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 Operator may refer to: Mathematics * A symbol indicating a mathematical operation * Logical operator or logical connective in mathematical logic * Operator (mathematics), mapping that acts on elements of a space to produce elements of another sp ...
:
Alias MASSOP
  foreach ($a,$b,$c,$d; $nicklist($C))
    Mode $C +oooo $a $b $c $d
  endforeach
EndAlias


References


Further reading

* * Forrest Stroud (8 April 2004) , WinPlanet Software Reviews


External links


Visual IRC homepageReviews WebsiteList of features and screenshotsSourceForge project pageCollection of ViRC scriptsViRC DocCenter (Versus language reference)
{{IRC clients Free IRC clients IRC clients Scripting languages Windows IRC clients