Skip to main content

Visual IRC









Visual IRC


From Wikipedia, the free encyclopedia

Jump to navigation
Jump to search

































Visual IRC

Visual IRC 2
Visual IRC 2

Developer(s) Adrian Cable and Jesse McGrew
Stable release 2.0pl2 (December 30, 2007; 11 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






  • 1 History


  • 2 Versus


    • 2.1 Script storage


    • 2.2 Blocks that can be defined in a script


    • 2.3 Data storage


      • 2.3.1 Files


      • 2.3.2 Variables


      • 2.3.3 Associative arrays


      • 2.3.4 Pseudovariables




    • 2.4 Code examples




  • 3 References


  • 4 Further reading


  • 5 External links





History[edit]



  • Visual IRC (16-bit) - Released in 1995 for Windows 3.x, written by MeGALiTH. This program had many built-in features, but it was also scriptable with VPL (ViRC Programming Language), the predecessor to ViRCScript and Versus.

  • 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 Jesse McGrew AKA "Mr2001", particularly enhancements to the ViRCScript engine. The scripting language was incompatible with the earlier version. In later versions, voice chat and video conferencing features were added.


Development of the second incarnation slowed down, and by 2000, Visual IRC appeared to be dead. The original author MeGALiTH (Adrian Cable) passed the source code to a user, Mr2001 (Jesse 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 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 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 through the project's web site and SourceForge.



Versus[edit]


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[edit]


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[edit]




  • Aliases are subroutines. 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, methods, a constructor, and a destructor.


  • Events are used to handle messages from the IRC server, as well as certain system- or client-level occurrences, such as completing a file transfer or opening a new window.

    • Server events use regular expressions or Versus's own wildcard characters 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 menus 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 toolbars 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[edit]



Files[edit]



  • 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[edit]



  • 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[edit]




  • 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[edit]



  • 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[edit]


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


References[edit]





  1. ^ https://sourceforge.net/projects/visualirc/files/ViRC/2.0pl2/




Further reading[edit]


.mw-parser-output .refbegin{font-size:90%;margin-bottom:0.5em}.mw-parser-output .refbegin-hanging-indents>ul{list-style-type:none;margin-left:0}.mw-parser-output .refbegin-hanging-indents>ul>li,.mw-parser-output .refbegin-hanging-indents>dl>dd{margin-left:0;padding-left:3.2em;text-indent:-3.2em;list-style:none}.mw-parser-output .refbegin-100{font-size:100%}



  • Charalabidis, Alex (1999). "Windows IRC Clients: Visual IRC". The Book of IRC: The Ultimate Guide to Internet Relay Chat. No Starch Press. pp. 37&ndash, 38. ISBN 1-886411-29-8..mw-parser-output cite.citation{font-style:inherit}.mw-parser-output q{quotes:"""""""'""'"}.mw-parser-output code.cs1-code{color:inherit;background:inherit;border:inherit;padding:inherit}.mw-parser-output .cs1-lock-free a{background:url("//upload.wikimedia.org/wikipedia/commons/thumb/6/65/Lock-green.svg/9px-Lock-green.svg.png")no-repeat;background-position:right .1em center}.mw-parser-output .cs1-lock-limited a,.mw-parser-output .cs1-lock-registration a{background:url("//upload.wikimedia.org/wikipedia/commons/thumb/d/d6/Lock-gray-alt-2.svg/9px-Lock-gray-alt-2.svg.png")no-repeat;background-position:right .1em center}.mw-parser-output .cs1-lock-subscription a{background:url("//upload.wikimedia.org/wikipedia/commons/thumb/a/aa/Lock-red-alt-2.svg/9px-Lock-red-alt-2.svg.png")no-repeat;background-position:right .1em center}.mw-parser-output .cs1-subscription,.mw-parser-output .cs1-registration{color:#555}.mw-parser-output .cs1-subscription span,.mw-parser-output .cs1-registration span{border-bottom:1px dotted;cursor:help}.mw-parser-output .cs1-hidden-error{display:none;font-size:100%}.mw-parser-output .cs1-visible-error{font-size:100%}.mw-parser-output .cs1-subscription,.mw-parser-output .cs1-registration,.mw-parser-output .cs1-format{font-size:95%}.mw-parser-output .cs1-kern-left,.mw-parser-output .cs1-kern-wl-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right,.mw-parser-output .cs1-kern-wl-right{padding-right:0.2em}

  • Forrest Stroud (8 April 2004) Visual IRC, WinPlanet Software Reviews




External links[edit]




  • Visual IRC homepage

  • List of features and screenshots

  • SourceForge project page

  • Collection of ViRC scripts

  • ViRC DocCenter (Versus language reference)

  • IRC Clients for Windows - list of 60 apps, list prepared by ircreviews.org












Retrieved from "https://en.wikipedia.org/w/index.php?title=Visual_IRC&oldid=876161440"





Navigation menu

























(window.RLQ=window.RLQ||).push(function(){mw.config.set({"wgPageParseReport":{"limitreport":{"cputime":"0.372","walltime":"0.501","ppvisitednodes":{"value":1586,"limit":1000000},"ppgeneratednodes":{"value":0,"limit":1500000},"postexpandincludesize":{"value":96851,"limit":2097152},"templateargumentsize":{"value":10465,"limit":2097152},"expansiondepth":{"value":29,"limit":40},"expensivefunctioncount":{"value":6,"limit":500},"unstrip-depth":{"value":0,"limit":20},"unstrip-size":{"value":2765,"limit":5000000},"entityaccesscount":{"value":1,"limit":400},"timingprofile":["100.00% 391.059 1 -total"," 46.21% 180.710 3 Template:Ambox"," 38.70% 151.325 2 Template:Infobox"," 30.98% 121.160 1 Template:Multiple_issues"," 26.97% 105.458 1 Template:Infobox_software"," 19.04% 74.475 1 Template:Notability"," 16.95% 66.270 1 Template:Cite_book"," 15.35% 60.025 1 Template:Infobox_software/simple"," 10.79% 42.201 1 Template:IRC_clients"," 10.18% 39.802 1 Template:IRC_footer"]},"scribunto":{"limitreport-timeusage":{"value":"0.149","limit":"10.000"},"limitreport-memusage":{"value":3594530,"limit":52428800}},"cachereport":{"origin":"mw1316","timestamp":"20181231151621","ttl":1900800,"transientcontent":false}}});});{"@context":"https://schema.org","@type":"Article","name":"Visual IRC","url":"https://en.wikipedia.org/wiki/Visual_IRC","sameAs":"http://www.wikidata.org/entity/Q7936556","mainEntity":"http://www.wikidata.org/entity/Q7936556","author":{"@type":"Organization","name":"Contributors to Wikimedia projects"},"publisher":{"@type":"Organization","name":"Wikimedia Foundation, Inc.","logo":{"@type":"ImageObject","url":"https://www.wikimedia.org/static/images/wmf-hor-googpub.png"}},"datePublished":"2003-09-02T06:32:55Z","dateModified":"2018-12-31T15:16:21Z","image":"https://upload.wikimedia.org/wikipedia/commons/1/1e/Virc.png","headline":"open source Internet Relay Chat client"}(window.RLQ=window.RLQ||).push(function(){mw.config.set({"wgBackendResponseTime":105,"wgHostname":"mw1329"});});

Popular posts from this blog

Florida Star v. B. J. F.

Danny Elfman

Lugert, Oklahoma