Hans Prestige DCC Whiteboard Specification
Visual IRC
   Features & Screenshots
   Download ViRC!
   Scripts

   Visual IRC Forum
   Chat in Undernet #ViRC

   Awards and Reviews
   About the Author
   About the Technology
ViRC Antique Shop

CTCP Handshake

DCC CHAT wboard encoded-ip port
  • encoded-ip - The sender's IPv4 address, expressed as a single number. The number is obtained by interpreting the 32-bit IP address as an unsigned integer in network byte order (most significant byte first).
  • port - The port on which the sender is listening for a DCC Whiteboard connection.

Overview

DCC Whiteboard sessions are line-based, similar to DCC Chat. Each line is terminated by LF or CRLF. Lines that begin with any character other than ASCII 001 (^A) are chat messages to be sent to the user's DCC console. Lines that begin with ^A are whiteboard commands to be processed by the client.

A session typically starts with option negotiation, where the two clients exchange commands to agree on a set of features they may use during the session. Only features that are supported by both clients may be used.

Chat Messages

Any line that does not start with ASCII 001 (^A) is a chat message. Chat messages allow users to talk to each other, as in DCC Chat. They may contain IRC formatting codes.

Whiteboard Commands

Each command is on its own line, introduced by ASCII 001 (^A) and optionally terminated by another ^A. Commands that accept parameters are separated from the parameter list with a single space, and the parameters themselves are separated by single commas.

BLT

BLT x1src,y1src,x2src,y2src,xdest,ydest

Copies a rectangular region from one area of the canvas to another. x2src must be greater than x1src, and y2src must be greater than y1src; the column x2src and the row y2src are not included in the region.

CAN

CAN option

Indicates that the sender supports the named option. If the recipient also supports the option, it should respond with a DO command and begin using the indicated feature; otherwise, the recipient should respond with a DONT command.

CANT

CANT option

Indicates that the sender does not support the named option. The recipient must not use the corresponding features, and must not respond to this command with a DO or DONT.

CLIP

CLIP x1,y1,x2,y2

(Not implemented in ViRC 2.0.) Sets the canvas's clipping region to the specified rectangle. x2 must be greater than x1 and y2 must be greater than y1; the column x2 and the row y2 are not included in the region.

Once a CLIP command is received, the recipient should not allow the user to start or end any drawing command outside the clipping region, until it receives a NOCLIP command.

CLS

CLS

Clears the canvas to all white.

DO

DO option

Indicates that the sender supports the named option, and wants the recipient to use it. If the recipient also supports the option, it should respond with a CAN command (unless it has already sent a CAN for this option) and begin using the indicated feature; otherwise, the recipient should respond with a CANT command.

DONT

DONT option

Indicates that the sender does not support the named option, and does not want the recipient to use it. The recipient must not use the corresponding features, and must not respond to this command with a CAN or CANT.

DR

DR tooltype,width,pencolor,brushcolor,x1,y1,x2,y2

Draws with the specified tool. The exact behavior of this command depends on tooltype (see below). Not all parameters are used with all tool types; when sending a DR command, the unused parameters should be 0.

pencolor and brushcolor are given as decimal integers representing an RGB color, where the low byte is R, second lowest byte is G, and third lowest byte is B. For example, the color orange (100% red, 50% green, 0% blue) can be converted to hex as $007FFF, and then converted to decimal and sent as "32767".

Tool types and their behaviors:

  • 0 (pencil), 1 (line): Draws a straight line between (x1,y1) and (x2,y2) using the pen color. width is the width of the line in pixels. The only difference between pencil and line is on the sending side: when the user is drawing with a pencil, his client should send a DR command for each mouse movement; when he's drawing with a line, the DR command should only be sent once he has chosen the line's start and end points.
  • 3 (rectangle): Draws the outline of a rectangle with the top left corner at (x1,y1) and the bottom right corner at (x2-1, y2-1), using the pen color. width is the width of the outline in pixels. The interior of the rectangle is not changed. The column x2 and the row y2 are not included in the rectangle.
  • 4 (ellipse): Same as 3 (rectangle), except instead of drawing the outline of the rectangle, an ellipse is inscribed inside the rectangle and drawn using the pen color.
  • 5 (filled rectangle) and 6 (filled ellipse): Same as 3 and 4, respectively, except that the interior of the rectangle or ellipse is filled with the brush color.
  • 8 (eraser): Same as 0 (pencil), except the line is drawn in white instead of the pen color.
  • 9 (flood fill): Uses a flood fill algorithm to change the pixel at (x1,y1), and any other connected pixels of the same color, to the pen color. x2 and y2 are ignored.
  • 10 (arrow): Same as 1 (line), except the line also has an arrow head at the (x2,y2) end.

ENTRY

ENTRY x,y

(Not implemented in ViRC 2.0.) Prompts the user to enter text at the location (x,y), as if he had clicked there with the text tool selected.

IMG

IMG ???

(Not implemented in ViRC 2.0.) To be discussed. IMG and IMGDATA will work together to transfer small bitmap images over the DCC Whiteboard connection, so that they can be placed with the STAMP command.

IMGDATA

IMGDATA ???

(Not implemented in ViRC 2.0.) To be discussed. See IMG above.

MAKEIMG

MAKEIMG name,x1,y1,x2,y2

(Not implemented in ViRC 2.0.) Copies a rectangular region from the canvas, specified by the corners (x1,y1) and (x2-1,y2-1), and saves it with the specified name for use with the STAMP command.

NOCLIP

NOCLIP

(Not implemented in ViRC 2.0.) Cancels a previous CLIP command, allowing the user to draw anywhere on the canvas.

SETSTAMP

SETSTAMP name

(Not implemented in ViRC 2.0.) Selects the rubber stamp tool and the stamp image identified by name, which has previously been created with IMG or MAKEIMG. This is intended for automated whiteboard systems or games, which may want to force a user to use a specific tool at a certain time, and it should be used sparingly.

SETTOOL

SETTOOL tooltype

(Not implemented in ViRC 2.0.) Selects the tool identified by tooltype, which must be one of the tool types that can be used with the DR command. This is intended for automated whiteboard systems or games, which may want to force a user to use a specific tool at a certain time, and it should be used sparingly.

STAMP

STAMP tooltype,x,y,name

(Not implemented in ViRC 2.0.) Draws the stamp image identified by name, centered at the location (x,y). tooltype is reserved for future use and should be left as 0.

TXT

TXT x,y,text

Writes text with its upper left corner at (x,y). The font, text color, and background color are unspecified and should be set to defaults chosen by the client. (ViRC 2.0 uses Tahoma 8 point, in the system default window text color, on a white background.)

TXTEX

TXTEX x,y,fontname,ptsize,style,textcolor,bgcolor,text

Writes text with its upper left corner at (x,y), using the specified font and style information. ptsize is the text size in points. textcolor and bgcolor are given as decimal integers, as in the DR command. style is a decimal integer formed by adding the constants for the desired text style: 1 for bold, 2 for italic, 4 for underline, and 8 for strikeout.

Option Negotiation

There is one option defined at the time of this writing: use-wb2. If this option is not enabled, only the CLS, DR, and TXT commands may be used. Also, the DR command may only be used with tools 0 through 6. All clients that implement this specification should support the use-wb2 option.

© Tara McGrew 2001-2023